Moving to a new operating system (whether it's Windows, the Mac or a Linux OS that's new to you) it's often difficult to find what you are looking for, at first. Take finding a list of your system hardware for example. In Windows, if you want a graphical display of the specs for your computer, you right-click on the My Computer icon and select Properties. I imagine that's not very intuitive if you have only ever used a Mac. Linux, too, has graphical tools to display information about your computer's hardware. With a KDE distribution, there is KInfoCenterunder the System menu. Under Gnome, there is a utility called SysInfo that does a similar thing. SysInfo is not installed by default in some distributions, like Ubuntu, but it is available in the package repositories. Just use your package manager to install it.
These graphical methods present a nice browsable list of information, but with a terminal and a few commands, you can really dig under the hood of your Linux computer's hardware. The remainder of this discussion describes how to use the command line to reveal some information stored in text files on your hard drive and, for the big finish, how to get all of your system information--all at once--by typing a single line of text into the terminal!
Under the hood, Linux is Linux. The various distributions of Linux have different applications and utilities packaged with the OS by default, different package managers, different window managers/desktop environments, different artwork, etc. Some actually implement the system structure in different ways (like installing applications in one system directory vs. another) but when it comes right down to it, they are pretty much all the same. The user experience can be very different with each distribution, however, because of the different "packaging." And that can be confusing to a new user. But underneath the outer layer is still the Linux kernel. The command line is where it all comes together, and that is where you can get your system specs most completely.
Here are some ideas and resources regarding how to display some of the statistics for your computer''s hardware and software using the command line. The list below contains some commands you can type into the terminal (or copy and paste if you prefer) that show some of the system information that is stored in text files on your system. You may not be that familiar with the command line, so let us start with a definition of some of these commands:
cat: takes the text contents of a file or files and displays it in the terminal window
grep: searches for a specific passage of text within a larger body of text
| (the vertical bar): tells the command line to take the output of the command to the left of the bar, and use it as input for the command to the right of the bar.
Useful commands: (Note that these should work regardless of your Linux distribution or window manager.)
CPU info:
cat /proc/cpuinfo | grep 'model name'
cat /proc/meminfo | grep MemTotal
cat /proc/meminfo | grep MemFree
You'll find more commands like this in these two references from FOSSWire:
Command Cheat Sheet
Ubuntu Cheat Sheet
Now... we've saved the best one for last. The command, lshw, is the "list hardware" command. You can type it at the command line without any switches or options, but the text file it generates runs on forever, and is a little difficult to follow in the terminal. It needs to run as root, hence the "sudo" in front of it. The command listed below runs lshw with the -html option to create an html file--usually in your home directory. Open it in a browser and you have a nice "web page" with all of your hardware specs.
When I ran it, this command even detected the mini-SD card on the BlackBerry phone I have charging on a USB port!
Comments :
Post a Comment