ruk·si

Commands
Environment

Updated at 2013-03-08 11:25

This note contains Unix commands related to the currently running environment. These work on most distributions, but sometimes you need to install the program.

hostname        # Print hostname. Useful for install scripts and config files.
uname -a        # show kernel version
uptime          # show how long system has been running
last reboot     # show system reboot history
id              # show active user and related groups
last            # show system login history
who             # show who are currently logged in
printenv        # PRINT ENVironmental variables
lsmod           # LiSt kernel MODule information
lspci           # LiSt PCI hardware
lsusb           # LiSt USB hardware
df              # Disk Files, tells disk usage.
df -h           # Human-readable, prints the result more nice for the eyes.
du -sh /tmp/*   # Disk Usage