If you are familiar with system administration, then you have used Linux system once or twice, if not everyday! Actually, these days system administration mainly refers to Linux system management. For this reason, having a good knowledge on Linux system is a must for system administrators. Here is A Must-have List of Linux Commands for Beginners. However, these commands are good for beginners, who are new to system administration. But for an advanced system administrator one should know more commands beyond these.
System Administration Commands
Of course, system administrator’s job area is huge! But, few common things every system administrator do are monitoring processes, terminating processes, checking disk spaces, freeing up disk spaces, viewing log files and many more. For this reason, in this article we will focus on the tools which are used to perform these tasks.
One of the main task of a system administrator is monitoring which process are running in a system. For this reason, there is a command ps. Actually this is one of the most used command. No doubt you can use many parameters with this command. Few examples are:
daredevil78@linux-i36u:~> ps – this will show the running process under current user, with process id.
daredevil78@linux-i36u:~> ps -ef – this will show various useful information. Few of them are User id, Process id, Parent Process id, Processor utilization time, and few more.
daredevil78@linux-i36u:~> ps –forest – this is a very nice command for watching parents and child process.
Actually, as a system administrator there will be many situation when you have to kill one or more running process. In this situation, you can two commands kill and killall.
daredevil78@linux-i36u:~> kill 380 – this command will kill the process with process id 380.
daredevil78@linux-i36u:~> killall http* – this command will kill all the processes starts with http.
Real-time Process Monitoring
Although, ps command show various information about running processes, it is not real-time monitoring. By using ps command we can see the running process for a particular time. For this reason, there is another command, top. This command shows running processes in real time.
daredevil78@linux-i36u:~> top – this command shows also shows running processes, but in real time. It additionally shows priority of a process, virtual memory used by a process, physical memory used by a process and few things more.
No doubt, you will run out of disk space at some point. For this reason, you have to monitor and free up disk space more often. There are two popular commands for this purpose.
daredevil78@linux-i36u:~> df -h – this command shows disk spaces in a human readable format. K for kilobyte, M for megabyte and G for gigabyte.
daredevil78@linux-i36u:~> du -s – this command shows a list of space used by directories and files. It also summarizes each arguments.
Finally, these are the 6 tools you can use in any Linux system. They are per-loaded with every Linux system. Although there are literally hundreds and thousands of Linux command, but mastering these commands will help you to done your job with more ease! So start practicing now!