{"id":13578,"date":"2019-04-03T11:03:05","date_gmt":"2019-04-03T11:03:05","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=13578"},"modified":"2019-04-03T11:03:05","modified_gmt":"2019-04-03T11:03:05","slug":"30-useful-linux-commands-for-system-administrators","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/04\/03\/30-useful-linux-commands-for-system-administrators\/","title":{"rendered":"30 Useful Linux Commands for System Administrators"},"content":{"rendered":"<p>In this article we are going to review some of the useful and frequently used\u00a0<strong>Linux<\/strong>\u00a0or\u00a0<strong>Unix<\/strong>\u00a0commands for\u00a0<strong>Linux System Administrators<\/strong>\u00a0that are used in their daily life. This is not a complete but it\u2019s a compact list of commands to refer when needed. Let us start one by one how we can use those commands with examples.<\/p>\n<div id=\"attachment_1088\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/09\/30-Linux-Commands.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1088\" title=\"Linux System Administration Commands\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/09\/30-Linux-Commands-300x215.png\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/09\/30-Linux-Commands-300x215.png 300w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2012\/09\/30-Linux-Commands.png 442w\" alt=\"Linux System Administration Commands\" width=\"300\" height=\"215\" aria-describedby=\"caption-attachment-1088\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-1088\" class=\"wp-caption-text\">30 Useful Linux System Administration Commands<\/p>\n<\/div>\n<h3>1. Uptime Command<\/h3>\n<p>In Linux\u00a0<strong>uptime<\/strong>\u00a0command shows since how long your system is running and the number of users are currently logged in and also displays load average for\u00a0<strong>1,5<\/strong>\u00a0and\u00a0<strong>15<\/strong>\u00a0minutes intervals.<\/p>\n<pre><strong># uptime<\/strong>\r\n\r\n08:16:26 up 22 min,  1 user,  load average: 0.00, 0.03, 0.22<\/pre>\n<h4>Check Uptime Version<\/h4>\n<p><strong>Uptime<\/strong>\u00a0command don\u2019t have other options other than\u00a0<strong>uptime<\/strong>\u00a0and\u00a0<strong>version<\/strong>. It gives information only in\u00a0<strong>hours:mins<\/strong>\u00a0if it less than\u00a0<strong>1<\/strong>\u00a0day.<\/p>\n<pre>[tecmint@tecmint ~]$ uptime -V\r\nprocps version 3.2.8<\/pre>\n<h3>2. W Command<\/h3>\n<p>It will displays users currently logged in and their process along-with shows\u00a0<strong>load averages<\/strong>. also shows the\u00a0<strong>login name<\/strong>,\u00a0<strong>tty name<\/strong>,\u00a0<strong>remote host<\/strong>,\u00a0<strong>login time<\/strong>,\u00a0<strong>idle time<\/strong>,\u00a0<strong>JCPU<\/strong>,\u00a0<strong>PCPU<\/strong>, command and processes.<\/p>\n<pre><strong># w<\/strong>\r\n\r\n08:27:44 up 34 min,  1 user,  load average: 0.00, 0.00, 0.08\r\nUSER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT\r\ntecmint  pts\/0    192.168.50.1     07:59    0.00s  0.29s  0.09s w<\/pre>\n<h4>Available options<\/h4>\n<ol>\n<li><strong>-h<\/strong>\u00a0: displays no header entries.<\/li>\n<li><strong>-s<\/strong>\u00a0: without JCPU and PCPU.<\/li>\n<li><strong>-f<\/strong>\u00a0: Removes from field.<\/li>\n<li><strong>-V<\/strong>\u00a0: (upper letter) \u2013 Shows versions.<\/li>\n<\/ol>\n<h3>3. Users Command<\/h3>\n<p>Users command displays currently logged in users. This command don\u2019t have other parameters other than help and version.<\/p>\n<pre><strong># users<\/strong>\r\n\r\ntecmint<\/pre>\n<h3>4. Who Command<\/h3>\n<p><strong>who<\/strong>\u00a0command simply return\u00a0<strong>user name<\/strong>,\u00a0<strong>date<\/strong>,\u00a0<strong>time<\/strong>\u00a0and\u00a0<strong>host information<\/strong>. who command is similar to\u00a0<strong>w<\/strong>command. Unlike\u00a0<strong>w<\/strong>\u00a0command\u00a0<strong>who<\/strong>\u00a0doesn\u2019t print what users are doing. Lets illustrate and see the different between\u00a0<strong>who<\/strong>\u00a0and\u00a0<strong>w<\/strong>\u00a0commands.<\/p>\n<pre><strong># who<\/strong>\r\n\r\ntecmint  pts\/0        2012-09-18 07:59 (192.168.50.1)<\/pre>\n<pre><strong># w<\/strong>\r\n\r\n08:43:58 up 50 min,  1 user,  load average: 0.64, 0.18, 0.06\r\nUSER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT\r\ntecmint  pts\/0    192.168.50.1     07:59    0.00s  0.43s  0.10s w<\/pre>\n<h4>Who command Options<\/h4>\n<ol>\n<li><strong>-b<\/strong>\u00a0: Displays last system reboot date and time.<\/li>\n<li><strong>-r<\/strong>\u00a0: Shows current runlet.<\/li>\n<li><strong>-a, \u2013all<\/strong>\u00a0: Displays all information in cumulatively.<\/li>\n<\/ol>\n<h3>5. Whoami Command<\/h3>\n<p><strong>whoami<\/strong>\u00a0command print the name of current user. You can also use \u201c<strong>who am i<\/strong>\u201d command to display the current user. If you are logged in as a root using sudo command \u201c<strong>whoami<\/strong>\u201d command return\u00a0<strong>root<\/strong>\u00a0as current user. Use \u201c<strong>who am i<\/strong>\u201d command if you want to know the exact user logged in.<\/p>\n<pre><strong># whoami<\/strong>\r\n\r\ntecmint<\/pre>\n<h3>6. ls Command<\/h3>\n<p>ls command display list of files in human readable format.<\/p>\n<pre><strong># ls -l<\/strong>\r\n\r\ntotal 114\r\ndr-xr-xr-x.   2 root root  4096 Sep 18 08:46 bin\r\ndr-xr-xr-x.   5 root root  1024 Sep  8 15:49 boot<\/pre>\n<p>Sort file as per last modified time.<\/p>\n<pre><strong># ls -ltr<\/strong>\r\n\r\ntotal 40\r\n-rw-r--r--. 1 root root  6546 Sep 17 18:42 install.log.syslog\r\n-rw-r--r--. 1 root root 22435 Sep 17 18:45 install.log\r\n-rw-------. 1 root root  1003 Sep 17 18:45 anaconda-ks.cfg<\/pre>\n<p>For more examples of ls command, please check out our article on\u00a0<a href=\"https:\/\/www.tecmint.com\/15-basic-ls-command-examples-in-linux\/\" target=\"_blank\" rel=\"noopener\">15 Basic \u2018ls\u2019 Command Examples in Linux<\/a>.<\/p>\n<h3>7. Crontab Command<\/h3>\n<p>List schedule jobs for current user with\u00a0<strong>crontab<\/strong>\u00a0command and<strong>\u00a0-l<\/strong>\u00a0option.<\/p>\n<pre><strong># crontab -l<\/strong>\r\n\r\n00 10 * * * \/bin\/ls &gt;\/ls.txt<\/pre>\n<p>Edit your\u00a0<strong>crontab<\/strong>\u00a0with\u00a0<strong>-e<\/strong>\u00a0option. In the below example will open schedule jobs in\u00a0<strong>VI editor<\/strong>. Make a necessary changes and quit pressing\u00a0<strong>:wq<\/strong>\u00a0keys which saves the setting automatically.<\/p>\n<pre><strong># crontab -e<\/strong><\/pre>\n<p>For more examples of\u00a0<strong>Linux Cron Command<\/strong>, please read our earlier article on\u00a0<a href=\"https:\/\/www.tecmint.com\/11-cron-scheduling-task-examples-in-linux\/\" target=\"_blank\" rel=\"noopener\">11 Cron Scheduling Task Examples in Linux<\/a>.<\/p>\n<h3>8. Less Command<\/h3>\n<p><strong>less<\/strong>\u00a0command allows quickly view file. You can page up and down. Press \u2018<strong>q<\/strong>\u2018 to quit from less window.<\/p>\n<pre><strong># less install.log<\/strong>\r\n\r\nInstalling setup-2.8.14-10.el6.noarch\r\nwarning: setup-2.8.14-10.el6.noarch: Header V3 RSA\/SHA256 Signature, key ID c105b9de: NOKEY\r\nInstalling filesystem-2.4.30-2.1.el6.i686\r\nInstalling ca-certificates-2010.63-3.el6.noarch\r\nInstalling xml-common-0.6.3-32.el6.noarch\r\nInstalling tzdata-2010l-1.el6.noarch\r\nInstalling iso-codes-3.16-2.el6.noarch<\/pre>\n<h3>9. More Command<\/h3>\n<p><strong>more<\/strong>\u00a0command allows quickly view file and shows details in percentage. You can page up and down. Press \u2018<strong>q<\/strong>\u2018 to quit out from more window.<\/p>\n<pre><strong># more install.log<\/strong>\r\n\r\nInstalling setup-2.8.14-10.el6.noarch\r\nwarning: setup-2.8.14-10.el6.noarch: Header V3 RSA\/SHA256 Signature, key ID c105b9de: NOKEY\r\nInstalling filesystem-2.4.30-2.1.el6.i686\r\nInstalling ca-certificates-2010.63-3.el6.noarch\r\nInstalling xml-common-0.6.3-32.el6.noarch\r\nInstalling tzdata-2010l-1.el6.noarch\r\nInstalling iso-codes-3.16-2.el6.noarch\r\n<strong>--More--(10%)<\/strong><\/pre>\n<h3>10. CP Command<\/h3>\n<p>Copy file from source to destination preserving same mode.<\/p>\n<pre><strong># cp -p fileA fileB<\/strong><\/pre>\n<p>You will be prompted before overwrite to file.<\/p>\n<pre><strong># cp -i fileA fileB<\/strong><\/pre>\n<h3>11. MV Command<\/h3>\n<p>Rename\u00a0<strong>fileA<\/strong>\u00a0to\u00a0<strong>fileB<\/strong>.\u00a0<strong>-i<\/strong>\u00a0options prompt before overwrite. Ask for confirmation if exist already.<\/p>\n<pre><strong># mv -i fileA fileB<\/strong><\/pre>\n<h3>12. Cat Command<\/h3>\n<p><strong>cat<\/strong>\u00a0command used to view multiple file at the same time.<\/p>\n<pre><strong># cat fileA fileB<\/strong><\/pre>\n<p>You combine\u00a0<strong>more<\/strong>\u00a0and\u00a0<strong>less<\/strong>\u00a0command with cat command to view file contain if that doesn\u2019t fit in single screen \/ page.<\/p>\n<pre><strong># cat install.log | less<\/strong>\r\n\r\n<strong># cat install.log | more<\/strong><\/pre>\n<p>For more examples of Linux cat command read our article on\u00a0<a href=\"https:\/\/www.tecmint.com\/13-basic-cat-command-examples-in-linux\/\" target=\"_blank\" rel=\"noopener\">13 Basic Cat Command Examples in Linux<\/a>.<\/p>\n<h3>13. Cd command (change directory)<\/h3>\n<p>with cd command (change directory) it will goes to\u00a0<strong>fileA<\/strong>\u00a0directory.<\/p>\n<pre><strong># cd \/fileA<\/strong><\/pre>\n<h3>14. pwd command (print working directory)<\/h3>\n<p><strong>pwd<\/strong>\u00a0command return with present working directory.<\/p>\n<pre><strong># pwd<\/strong>\r\n\r\n\/root<\/pre>\n<h3>15. Sort command<\/h3>\n<p>Sorting lines of text files in ascending order. with\u00a0<strong>-r<\/strong>\u00a0options will sort in descending order.<\/p>\n<pre><strong>#sort fileA.txt<\/strong>\r\n\r\n<strong>#sort -r fileA.txt<\/strong><\/pre>\n<h3>16. VI Command<\/h3>\n<p><strong>Vi<\/strong>\u00a0is a most popular text editor available most of the\u00a0<strong>UNIX-like OS<\/strong>. Below examples open file in read only with\u00a0<strong>-R<\/strong>option. Press \u2018<strong>:q<\/strong>\u2018 to quit from vi window.<\/p>\n<pre><strong># vi -R \/etc\/shadows<\/strong><\/pre>\n<h3>17. SSH Command (Secure Shell)<\/h3>\n<p>SSH command is used to login into remote host. For example the below ssh command will connect to remote host (<strong>192.168.50.2<\/strong>) using user as\u00a0<strong>narad<\/strong>.<\/p>\n<pre><strong># ssh narad@192.168.50.2<\/strong><\/pre>\n<p>To check the version of ssh use option\u00a0<strong>-V<\/strong>\u00a0(uppercase) shows version of ssh.<\/p>\n<pre><strong># ssh -V<\/strong>\r\n\r\nOpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010<\/pre>\n<h3>18. Ftp or sftp Command<\/h3>\n<p><strong>ftp<\/strong>\u00a0or\u00a0<strong>sftp<\/strong>\u00a0command is used to connect to remote ftp host. ftp is (<strong>file transfer protocol<\/strong>) and sftp is (<strong>secure file transfer protocol<\/strong>). For example the below commands will connect to ftp host (<strong>192.168.50.2<\/strong>).<\/p>\n<pre><strong># ftp 192.168.50.2<\/strong>\r\n\r\n<strong># sftp 192.168.50.2<\/strong><\/pre>\n<p>Putting multiple files in remote host with\u00a0<strong>mput<\/strong>\u00a0similarly we can do\u00a0<strong>mget<\/strong>\u00a0to download multiple files from remote host.<\/p>\n<pre><strong># ftp &gt; mput *.txt<\/strong>\r\n\r\n<strong># ftp &gt; mget *.txt<\/strong><\/pre>\n<h3>19. Service Command<\/h3>\n<p><strong>Service<\/strong>\u00a0command call script located at\u00a0<strong>\/etc\/init.d\/<\/strong>\u00a0directory and execute the script. There are two ways to start the any service. For example we start the service called\u00a0<strong>httpd<\/strong>\u00a0with service command.<\/p>\n<pre><strong># service httpd start<\/strong>\r\nOR\r\n<strong># \/etc\/init.d\/httpd start<\/strong><\/pre>\n<h3>20. Free command<\/h3>\n<p><strong>Free<\/strong>\u00a0command shows\u00a0<strong>free<\/strong>,\u00a0<strong>total<\/strong>\u00a0and\u00a0<strong>swap memory<\/strong>\u00a0information in bytes.<\/p>\n<pre><strong># free<\/strong>\r\n             total       used       free     shared    buffers     cached\r\nMem:       1030800     735944     294856          0      51648     547696\r\n-\/+ buffers\/cache:     136600     894200\r\nSwap:      2064376          0    2064376<\/pre>\n<p>Free with\u00a0<strong>-t<\/strong>\u00a0options shows\u00a0<strong>total memory<\/strong>\u00a0used and available to use in bytes.<\/p>\n<pre><strong># free -t<\/strong>\r\n             total       used       free     shared    buffers     cached\r\nMem:       1030800     736096     294704          0      51720     547704\r\n-\/+ buffers\/cache:     136672     894128\r\nSwap:      2064376          0    2064376\r\nTotal:     3095176     736096    2359080<\/pre>\n<h3>21. Top Command<\/h3>\n<p><strong>top<\/strong>\u00a0command displays processor activity of your system and also displays tasks managed by kernel in real-time. It\u2019ll show\u00a0<strong>processor<\/strong>\u00a0and\u00a0<strong>memory<\/strong>\u00a0are being used. Use top command with\u00a0<strong>\u2018u<\/strong>\u2018 option this will display specific User process details as shown below. Press \u2018<strong>O<\/strong>\u2018 (<strong>uppercase letter<\/strong>) to sort as per desired by you. Press \u2018<strong>q<\/strong>\u2018 to quit from top screen.<\/p>\n<pre><strong># top -u tecmint<\/strong>\r\n\r\ntop - 11:13:11 up  3:19,  2 users,  load average: 0.00, 0.00, 0.00\r\nTasks: 116 total,   1 running, 115 sleeping,   0 stopped,   0 zombie\r\nCpu(s):  0.0%us,  0.3%sy,  0.0%ni, 99.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st\r\nMem:   1030800k total,   736188k used,   294612k free,    51760k buffers\r\nSwap:  2064376k total,        0k used,  2064376k free,   547704k cached\r\n\r\nPID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND\r\n1889 tecmint   20   0 11468 1648  920 S  0.0  0.2   0:00.59 sshd\r\n1890 tecmint   20   0  5124 1668 1416 S  0.0  0.2   0:00.44 bash\r\n6698 tecmint   20   0 11600 1668  924 S  0.0  0.2   0:01.19 sshd\r\n6699 tecmint   20   0  5124 1596 1352 S  0.0  0.2   0:00.11 bash<\/pre>\n<p>For more about top command we\u2019ve already compiled a list of\u00a0<a href=\"https:\/\/www.tecmint.com\/12-top-command-examples-in-linux\/\" target=\"_blank\" rel=\"noopener\">12 TOP Command Examples in Linux<\/a>.<\/p>\n<h3>22. Tar Command<\/h3>\n<p><strong>tar<\/strong>\u00a0command is used to compress files and folders in Linux. For example the below command will create a archive for\u00a0<strong>\/home<\/strong>\u00a0directory with file name as\u00a0<strong>archive-name.tar<\/strong>.<\/p>\n<pre><strong># tar -cvf archive-name.tar \/home<\/strong><\/pre>\n<p>To extract tar archive file use the option as follows.<\/p>\n<pre><strong># tar -xvf archive-name.tar<\/strong><\/pre>\n<p>To understand more about\u00a0<strong>tar command<\/strong>\u00a0we\u2019ve created a complete\u00a0<strong>how-to guide<\/strong>\u00a0on tar command at\u00a0<a href=\"https:\/\/www.tecmint.com\/18-tar-command-examples-in-linux\/\" target=\"_blank\" rel=\"noopener\">18 Tar Command Examples in Linux<\/a>.<\/p>\n<h3>23. Grep Command<\/h3>\n<p>grep search for a given string in a file. Only\u00a0<strong>tecmint<\/strong>\u00a0user displays from\u00a0<strong>\/etc\/passwd<\/strong>\u00a0file. we can use\u00a0<strong>-i<\/strong>\u00a0option for ignoring case sensitive.<\/p>\n<pre><strong># grep tecmint \/etc\/passwd<\/strong>\r\n\r\ntecmint:x:500:500::\/home\/tecmint:\/bin\/bash<\/pre>\n<h3>24. Find Command<\/h3>\n<p>Find command used to search\u00a0<strong>files<\/strong>,\u00a0<strong>strings<\/strong>\u00a0and\u00a0<strong>directories<\/strong>. The below example of find command search\u00a0<strong>tecmint<\/strong>\u00a0word in \u2018<strong>\/<\/strong>\u2018 partition and return the output.<\/p>\n<pre><strong># find \/ -name tecmint<\/strong>\r\n\r\n\/var\/spool\/mail\/tecmint\r\n\/home\/tecmint\r\n\/root\/home\/tecmint<\/pre>\n<p>For complete guide on\u00a0<strong>Linux find command<\/strong>\u00a0examples fount at\u00a0<a href=\"https:\/\/www.tecmint.com\/35-practical-examples-of-linux-find-command\/\" target=\"_blank\" rel=\"noopener\">35 Practical Examples of Linux Find Command<\/a>.<\/p>\n<h3>25. lsof Command<\/h3>\n<p><strong>lsof<\/strong>\u00a0mean List of all open files. Below lsof command list of all opened files by user\u00a0<strong>tecmint<\/strong>.<\/p>\n<pre><strong># lsof -u tecmint<\/strong>\r\n\r\nCOMMAND  PID    USER   FD   TYPE     DEVICE SIZE\/OFF   NODE NAME\r\nsshd    1889 tecmint  cwd    DIR      253,0     4096      2 \/\r\nsshd    1889 tecmint  txt    REG      253,0   532336 298069 \/usr\/sbin\/sshd\r\nsshd    1889 tecmint  DEL    REG      253,0          412940 \/lib\/libcom_err.so.2.1\r\nsshd    1889 tecmint  DEL    REG      253,0          393156 \/lib\/ld-2.12.so\r\nsshd    1889 tecmint  DEL    REG      253,0          298643 \/usr\/lib\/libcrypto.so.1.0.0\r\nsshd    1889 tecmint  DEL    REG      253,0          393173 \/lib\/libnsl-2.12.so\r\nsshd    1889 tecmint  DEL    REG      253,0          412937 \/lib\/libkrb5support.so.0.1\r\nsshd    1889 tecmint  DEL    REG      253,0          412961 \/lib\/libplc4.so<\/pre>\n<p>For more\u00a0<strong>lsof command examples<\/strong>\u00a0visit\u00a0<a href=\"https:\/\/www.tecmint.com\/10-lsof-command-examples-in-linux\/\" target=\"_blank\" rel=\"noopener\">10 lsof Command Examples in Linux<\/a>.<\/p>\n<h3>26. last command<\/h3>\n<p>With last command we can watch user\u2019s activity in the system. This command can execute normal user also. It will display complete user\u2019s info like\u00a0<strong>terminal<\/strong>,\u00a0<strong>time<\/strong>,\u00a0<strong>date<\/strong>,\u00a0<strong>system reboot<\/strong>\u00a0or\u00a0<strong>boot<\/strong>\u00a0and\u00a0<strong>kernel version<\/strong>. Useful command to troubleshoot.<\/p>\n<pre><strong># last<\/strong>\r\n\r\ntecmint  pts\/1        192.168.50.1     Tue Sep 18 08:50   still logged in\r\ntecmint  pts\/0        192.168.50.1     Tue Sep 18 07:59   still logged in\r\nreboot   system boot  2.6.32-279.el6.i Tue Sep 18 07:54 - 11:38  (03:43)\r\nroot     pts\/1        192.168.50.1     Sun Sep 16 10:40 - down   (03:53)\r\nroot     pts\/0        :0.0             Sun Sep 16 10:36 - 13:09  (02:32)\r\nroot     tty1         :0               Sun Sep 16 10:07 - down   (04:26)\r\nreboot   system boot  2.6.32-279.el6.i Sun Sep 16 09:57 - 14:33  (04:35)\r\nnarad    pts\/2        192.168.50.1     Thu Sep 13 08:07 - down   (01:15)<\/pre>\n<p>You can use\u00a0<strong>last<\/strong>\u00a0with\u00a0<strong>username<\/strong>\u00a0to know for specific user\u2019s activity as shown below.<\/p>\n<pre><strong># last tecmint<\/strong>\r\n\r\ntecmint  pts\/1        192.168.50.1     Tue Sep 18 08:50   still logged in\r\ntecmint  pts\/0        192.168.50.1     Tue Sep 18 07:59   still logged in\r\ntecmint  pts\/1        192.168.50.1     Thu Sep 13 08:07 - down   (01:15)\r\ntecmint  pts\/4        192.168.50.1     Wed Sep 12 10:12 - 12:29  (02:17)<\/pre>\n<h3>27. ps command<\/h3>\n<p><strong>ps<\/strong>\u00a0command displays about processes running in the system. Below example show\u00a0<strong>init<\/strong>\u00a0process only.<\/p>\n<pre><strong># ps -ef | grep init<\/strong>\r\n\r\nroot         1     0  0 07:53 ?        00:00:04 \/sbin\/init\r\nroot      7508  6825  0 11:48 pts\/1    00:00:00 grep init<\/pre>\n<h3>28. kill command<\/h3>\n<p>Use\u00a0<strong>kill<\/strong>\u00a0command to terminate process. First find process\u00a0<strong>id<\/strong>\u00a0with\u00a0<strong>ps<\/strong>\u00a0command as shown below and kill process with\u00a0<strong>kill -9<\/strong>\u00a0command.<\/p>\n<pre><strong># ps -ef | grep init<\/strong>\r\nroot         1     0  0 07:53 ?        00:00:04 \/sbin\/init\r\nroot      7508  6825  0 11:48 pts\/1    00:00:00 grep init\r\n\r\n<strong># kill- 9 7508<\/strong><\/pre>\n<h3>29. rm command<\/h3>\n<p><strong>rm<\/strong>\u00a0command used to remove or delete a file without prompting for confirmation.<\/p>\n<pre><strong># rm filename<\/strong><\/pre>\n<p>Using<strong>\u00a0-i<\/strong>\u00a0option to get confirmation before removing it. Using options \u2018<strong>-r<\/strong>\u2018 and \u2018<strong>-f<\/strong>\u2018 will remove the file forcefully without confirmation.<\/p>\n<pre><strong># rm -i test.txt<\/strong>\r\n\r\nrm: remove regular file `test.txt'?<\/pre>\n<h3>30. mkdir command example.<\/h3>\n<p><strong>mkdir<\/strong>\u00a0command is used to create directories under Linux.<\/p>\n<pre><strong># mkdir directoryname<\/strong><\/pre>\n<p>This is a handy day to day useable basic commands in Linux \/ Unix-like operating system. Kindly share through our comment box if we missed out.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/useful-linux-commands-for-system-administrators\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article we are going to review some of the useful and frequently used\u00a0Linux\u00a0or\u00a0Unix\u00a0commands for\u00a0Linux System Administrators\u00a0that are used in their daily life. This is not a complete but it\u2019s a compact list of commands to refer when needed. Let us start one by one how we can use those commands with examples. 30 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/04\/03\/30-useful-linux-commands-for-system-administrators\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;30 Useful Linux Commands for System Administrators&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-13578","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13578","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=13578"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13578\/revisions"}],"predecessor-version":[{"id":13579,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13578\/revisions\/13579"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=13578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=13578"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=13578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}