Linux command list for System Info


  1. pwd

    Prints the current working directory (Print Working Directory)

  2. hostname

    Print the name of the local host (the machine on which you are working). If you want to change the name of the machine, Use netconf (as root).

  3. id username

    Print user id (uid) and his/her group id (gid), effective id (if different than the real id) and the supplementary groups.

  4. whoami
    Prints your login name.
  5. date
    Print or change the operating system date and time. If you want to change the date and time to 2010-12-31 23:57 using this command:
    date 123123572010
    To set the hardware (BIOS) clock from the system (Linux) clock, use the command (as root) setclock
  6. who
    Determine the users logged on the machine.
  7. rwho -a
    (remote who) Determine all users logged on your network. The rwho service must be enabled for this command to run. If it isn’t, install “rwho”.
  8. time
    Determine the amount of time that it takes for a process to complete + other info. Don’t confuse it with thedate command. E.g. I can find out how long it takes to display a directory content using:
    time ls
  9. finger username
    System info about a user. Try: finger root
  10. last
    Show listing of users last logged-in on your system.
  11. history | more
    Show the last (1000 or so) commands executed from the command line on the current account. The “| more” causes the display to stop after each screenful.
  12. uptime
    Show the amount of time since the last reboot.
  13. ps
    (Process Status) List the processes currently run by the current user.
  14. ps axu | more
    List all the processes currently running, even those without the controlling terminal, together with the name of the user that owns each process.
  15. top
    Keep listing the currently running processes, sorted by cpu usage (top users first). In KDE, you can get GUI-based Ktop from “K”menu under “System”-”Task Manager” (or by executing “ktop” in an X-terminal).
  16. uname -a
    (Unix Name with option “all”) Info on your (local) server. I can also use guname (in X-window terminal) to display the info more nicely.
  17. free
    Memory info (in kilobytes).
  18. df -h
    (Disk Free) Print disk info about all the filesystems (in human-readable form)
  19. du / -bh | more
    (Disk Usage) Print detailed disk usage for each subdirectory starting at the “/” (root) directory (in human legible form).
  20. cat /proc/cpuinfo
    Cpu info–it show the content of the file cpuinfo. Note that the files in the /proc directory are not real files–they are hooks to look at information available to the kernel.
  21. cat /proc/interrupts
    List the interrupts in use.
  22. cat /proc/version
    Linux version and other info
  23. cat /proc/filesystems
    Show the types of filesystems currently in use.
  24. cat /etc/printcap
    Show the setup of printers.
  25. lsmod
    (As root. Use /sbin/lsmod to execute this command when you are a non-root user.) Show the kernel modules currently loaded.
  26. set|more
    Show the current user environment.
  27. echo $PATH
    Show the content of the environment variable “PATH”. This command can be used to show other environment variables as well. Use “set” to see the full environment.
  28. dmesg | less
    Print kernel messages (the content of the so-called kernel ring buffer). Press “q” to quit “less”. Use less /var/log/dmesg to see what “dmesg” dumped into this file right after the last system bootup.

Comments are closed.