Useful Commands for System Administration in Linux


The following commands are commonly used for system administrators to manage a Linux system.

1. To monitor the CPU and memory usage of each process
# top

2. To check the CPU information
# cat /proc/cpuinfo

3. To check the memory information
# free
# cat /proc/meminfo

4. To check how long the system has been up
# uptime

5. To check the last reboot time
# who -b
# last reboot | less

6. To check installed network devices
# ifconfig -a

7. To check the NIC information
# ethtool -i 'eth-dev'
# modinfo 'driver-name'

8. To check user login history
# last -x

8. To check a running process
# ps -C 'pname'

9. To kill a process
# kill 'pid'
# killall -e 'pname'

10. To shut down a server
# poweroff