1
vote

I used to ssh into many linux systems for some kind of administration tasks. Most of the times I don't even know what are the characteristics of the machine I'm logged onto. Is there a command line tool that can tell me all relevant system info at once? (Like CPU, RAM, hard disks, network configuration, Linux distribution installed...)

Edit:

OK, thank you all. Of course I do know all the commands that separately gives me all the information I need (ls[pci,usb,hw], cat /proc/*, etc...). What I'm looking for is exactly a tool like Facter, thank you.

5 Answers 5

4
votes

Facter would be perfect for this. See this question for a display of information it can provide.

One very nice thing about facter is that its output is standardized across operating systems and distributions. You can expect output to be formatted the same regardless of whether it's being run on a Solaris system, Linux, BSD, OSX, etc.

3
votes

There are various commands, which might not be installed, that will give you information on the hardware - but sadly there isn't a simple "overview".

You will probably want to investigate the use of at least the following tools:

lspci
lsusb
lshw

In addition to that you can see the memory via "free -m", or "cat /proc/meminfo" and get details of the kernel via "uname -a" or "cat /proc/version".

2
  • 1
    plus one for the ls* tools. Forgot about those
    – sreimer
    Jul 6, 2011 at 16:02
  • Don't forget dmidecode. It'll let you know what the BIOS knows.
    – 84104
    Jul 6, 2011 at 16:22
1
vote

Most of the information you need is in /proc which other command line utilities like top use

    cat /proc/meminfo
    cat /proc/cpuinfo

Lots of other good stuff in proc if you poke around.

For checking disks you can use df which will also tell you disk usage stats

    df -h

For net config, ifconfig should do the trick. I don't know of a single command that will provide everything your looking for in one shot.

1
vote

Quite a lot of hardware information is available from dmidecode. It doesn't give you a lot of information on disks, but you can run fdisk -l to see what disks are attached.

As mentioned, lspci, lsusb, and lshw will also get you a lot of information.

0
votes

depending upon what other processes may have written, 'dmesg' may show you the full output of the bootup sequence, which gives quite a bit of info on the hardware and configuration. the same info is typically written to /var/log/messages, so you can look there - depending also on how frequently /var/log/messages is rolled/archived, and how long the archives are retained. you may find the info in /var/log/{messages.1,messages.2,messages.3, etc}

Not the answer you're looking for? Browse other questions tagged .