{"id":358,"date":"2014-07-21T00:00:00","date_gmt":"2014-07-21T00:00:00","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/2014\/07\/21\/linux-commands-for-administrator\/"},"modified":"2021-02-27T09:52:11","modified_gmt":"2021-02-27T09:52:11","slug":"linux-commands-for-administrator","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-administrator\/","title":{"rendered":"Linux Commands for Administrator | Linux Admin Commands Reference"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3667 aligncenter\" src=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2014\/07\/linux-commands-administrato.png\" alt=\"linux-commands-administrators\" width=\"600\" height=\"400\" srcset=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2014\/07\/linux-commands-administrato.png 600w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2014\/07\/linux-commands-administrato-300x200.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p><strong>su: Acquiring Superuser Status<\/strong><br \/>\n# su\u00a0 :- Acquire\u00a0 Superuser after entering password but home directory does not change<br \/>\n# su \u2013 l :\u2013 Acquire Superuser access after password but home\u00a0 directory change to ROOT<br \/>\n# su\u00a0 &#8211; henry : &#8211; To\u00a0 Login and Recreate a user environment<br \/>\n# sudo -s root -c &#8220;\/bin\/bash -l&#8221;<\/p>\n<p><strong>passwd \u2013 Changing any Password<\/strong><br \/>\n# passwd henry<br \/>\nstat &lt;fileName&gt;<\/p>\n<p><strong>ulimit \u2013 Setting Limits on file size<\/strong><br \/>\nulimit command impost a restriction on the maximum size of a file that a user is permitted to create<br \/>\n# ulimit 20971510\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 This is often placed in \/etc\/profile. Measured in 512 byte blocks<\/p>\n<p><strong>umask \u2013 Please refer user manual<\/strong><\/p>\n<p><strong>Source<\/strong><br \/>\nThe source command in shell is used to execute commands from a file in the current shell. This is useful to load function or variables stored in another file.<br \/>\n# source filename<br \/>\n# source \/path\/to\/file<\/p>\n<p><strong>locate<\/strong><\/p>\n<pre><strong>To locate any files in system. This works based on <\/strong>updatedb.<\/pre>\n<pre># locate<\/pre>\n<pre># updatedb\u00a0\u00a0\u00a0\u00a0 Run as a root.File location is \/var\/lib\/mlocate\/mlocate.db<\/pre>\n<p><strong>which <\/strong><br \/>\nshows the full path of (shell) commands<\/p>\n<p><strong>od<\/strong><br \/>\nod command dumps a file in octal, decimal, and other formats.<\/p>\n<pre># od -c special-chars.txt<\/pre>\n<p># od -bc special-chars.txt<\/p>\n<p><strong>chkconfig<\/strong><br \/>\nchkconfig command is used to setup, view, or change services that are configured to start automatically during the system startup.<\/p>\n<p>The \u2013list option displays all the services with the current startup configuration status.<br \/>\n# chkconfig &#8211;list<br \/>\nTo view only the services that are configured to be started during system startup, do the following. Please note that this assumes that your system startup level is 3<br \/>\n# chkconfig &#8211;list | grep 3:on<br \/>\nTo display the current settings for a selected service only, use chkconfig &#8211;list followed by the name of the service:<br \/>\n# chkconfig &#8211;list service_name<\/p>\n<p>To enable a service in runlevels 2, 3, 4, and 5, type the following at a shell prompt as root.<br \/>\n# chkconfig service_name on<br \/>\nTo disable a service in runlevels 2, 3, 4, and 5, type the following at a shell prompt as root.<br \/>\n# chkconfig service_name off<\/p>\n<p># chkconfig network &#8211;level 3 &amp;&amp; echo &#8220;Network service is configured for level 3&#8221;<br \/>\n# chkconfig network &#8211;level 1 &amp;&amp; echo &#8220;Network service is configured for level 1&#8221;<\/p>\n<p>To view the startup configuration of a particular service, grep the output of \u2018chkconfig \u2013list\u2019 for that service.<br \/>\n# chkconfig &#8211;list | grep network<\/p>\n<p>Add a new Service to the Startup<br \/>\n# chkconfig &#8211;add iptables<\/p>\n<p>To remove it from the startup list, use the \u2013del option as shown below.<br \/>\n# chkconfig &#8211;del ip6tables<\/p>\n<p><strong>How to install services?<\/strong><\/p>\n<pre><strong>Step 1. Copy the script into <\/strong>\/etc\/init.d\/ such as \/etc\/init.d\/httpd<\/pre>\n<pre>Step 2. chkconfig --add httpd<\/pre>\n<p>http:\/\/bitnami.org\/article\/how-to-install-services-on-linux<\/p>\n<p><strong>service<\/strong><br \/>\n# service network restart<br \/>\nOR<br \/>\n# \/etc\/init.d\/network restart<\/p>\n<p>To start Linux network service:<br \/>\n# service network start<\/p>\n<p>To stop Linux network service:<br \/>\n# service network stop<\/p>\n<p><strong>date \u2013 Setting the system Date<\/strong><br \/>\n# date MMDDhhmm<\/p>\n<p><strong>groupadd<\/strong><br \/>\n# groupadd \u2013g 241 dba\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 The command place entry in \/etc\/group which can also insert manually(dba:x:241). 241 is GID of dba<\/p>\n<p><strong>useradd<\/strong><br \/>\n# useradd \u2013u 210 \u2013g dba \u2013c \u201cThe RDBMS\u201d \u2013d \/home\/oracle \u2013s \/bin\/bash \u2013m username<\/p>\n<p><strong>usermod<\/strong><br \/>\n# usermod \u2013s \/bin\/csh username<\/p>\n<p><strong>userdel<\/strong><br \/>\n# userdel username<\/p>\n<p><strong>shutdown<\/strong><br \/>\n# shutdown 17:30\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Shutdown at 17:30<br \/>\n# shutdown \u2013r now\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Shutdown immediately and reboot<br \/>\n# shutown \u2013r 17:30\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Shutdown immediately and reboot at 17:30<br \/>\n# shutown \u2013h now\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Shutdown immediately and halt<br \/>\n# shutown \u2013h 17:30\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Shutdown at 17:30<br \/>\n# shutdown \u2013c\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Cancel the shutdown<br \/>\nReboot \/ Poweroff \/ halt<\/p>\n<p><strong>df<\/strong><br \/>\nThe df (disk free) command lets you see if file systems are full.<\/p>\n<ul>\n<li>To see how much free space is in all file systems (including mounted ones), use df<\/li>\n<li>To see how much free space is in all file systems with names containing &#8220;dev&#8221;, use df | grep dev<\/li>\n<li>To see how much free space is in your home file system, use df \/home<\/li>\n<li>To see how much free space is in the file system &#8220;tmp&#8221;, use df \/tmp<\/li>\n<li>To see if there is enough free space on the machine, check the output from the following<\/li>\n<\/ul>\n<p># df \/usr,<br \/>\n# df \/var<br \/>\n# df -k \/tmp \/home\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 -k Reports in units of KB<br \/>\n<strong># <\/strong>df \u2013h \/ \/usr\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 -h reports in MB, GB<\/p>\n<p><strong>du -Disk usage<\/strong><br \/>\n# du\u00a0 \/home\/sales\/tml<br \/>\n# du \u2013s \/home\/*\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 -s options for summary disk usage information for tml directory<br \/>\n# du \u2013sh \/home\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 -h options for reports in MB , GB<br \/>\n# find \/home \u2013size +1024 \u2013print\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Files above 1MB<br \/>\n# find \/home \u2013size +1024 \u2013size -4096 \u2013 print\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Files above 1Mb and below 4MB<\/p>\n<h3><a title=\"mount \/ unmount\" href=\"scm\/operating-systems\/unix-linux\/mount-and-unmount-filesystem-partition-in-linux.html\" target=\"_blank\" rel=\"noopener\">mount \/ unmount<\/a><\/h3>\n<p><strong>Using file for incremental Backup<\/strong><br \/>\n# tar \u2013cvf \/dev\/rct0 `find \/home \u2013type f \u2013newer .last_time \u2013print`<br \/>\n# touch .last_time<br \/>\n# tar \u2013cvf \/dev\/rct0 \/home &gt; homelist `date \u201c+%d%b%y\u201d`<\/p>\n<h3><a href=\"scm\/operating-systems\/unix-linux\/20-xargs-command-examples-in-linux-unix.html\" target=\"_blank\" rel=\"noopener\">xrags<\/a><\/h3>\n<h3><a href=\"http:\/\/danielmiessler.com\/blog\/linux-xargs-vs-exec\/\">xargs vs. exec {}<\/a><\/h3>\n<p><strong>Remote machine Login: telnet, rlogin<\/strong><br \/>\n<strong>telnet<\/strong><br \/>\n<strong>rlogin<\/strong><\/p>\n<p><strong>Secure Login with password: ssh <\/strong><br \/>\n<strong>ssh<\/strong><\/p>\n<p><strong>Remote login without Password: rsh<\/strong><br \/>\n<strong>rsh<\/strong><\/p>\n<p><strong>File Transfer: ftp, rcp, scp<\/strong><br \/>\n<strong>rcp<\/strong><\/p>\n<p><strong>scp<\/strong><\/p>\n<p><strong>ftp<\/strong><br \/>\nftp rajesh-servers &#8211; How to Login<br \/>\nDirectory Commands:<br \/>\n# cd [directory] Changes to the specified directory on the remote system.<br \/>\n# dir Displays a long listing of files on the remote system.<br \/>\n# ls Displays a short listing of the files on the remote system.<br \/>\n# lcd Changes the working directory on the local system.<br \/>\n# pwd Displays the working directory on the remote system.<br \/>\nFile Transfer Commands:<br \/>\n# get [filename] Downloads a single file from the remote system.<br \/>\n# put [filename] Uploads a single file to the remote system.<br \/>\n# mget [file&#8230;] Downloads multiple files from the remote system.<br \/>\n# mput [file&#8230;] Uploads multiple files to the remote system.<\/p>\n<p><strong>Generic troubleshooting tips<\/strong><\/p>\n<ul>\n<li>Use tail \u2013f to watch log file in real time, advantage is simple you can spot error or warning message in real time.<br \/>\n<strong>tail \u2013f \/path\/to\/log\/file<\/strong><strong><br \/>\nExample(s):<br \/>\n<strong># tail \u2013f \/var\/log\/maillog<\/strong><\/strong><\/li>\n<li>Use telnet command to see if you get response or not. Sometime you will also see some informative message:<br \/>\n<strong>telnet ip port<\/strong><\/li>\n<\/ul>\n<p>Example(s):<br \/>\n<strong># telnet localhost 53<\/strong><br \/>\n<strong># telnet localhost 25<\/strong><\/p>\n<ul>\n<li>Make sure you can see PID of your service.<br \/>\n<strong>pidof service-name<\/strong><strong><br \/>\n<strong>cat \/var\/run\/service.pid<\/strong><\/strong><strong><br \/>\nExample(s):<br \/>\n<strong># pidof sshd<\/strong><br \/>\n<strong># cat \/var\/run\/sshd.pid<\/strong><\/strong><\/li>\n<li>You need to make sure that your DNS server or third party DNS server (ISP) is accessible. This is an important step, as many network services depend upon DNS; especially sendmail\/postfix or Squid etc for example. Run dig or nslookup. No timeout should occurred.<br \/>\n<strong><br \/>\n<strong># dig your-domain.com<\/strong><br \/>\n<strong># nslookup gw.isp.com<\/strong><br \/>\n<strong># more \/etc\/resolv.conf<\/strong><\/strong><\/li>\n<\/ul>\n<p><strong>Performance \/ \u00a0Memory \/ CPU \/ Process check<\/strong><br \/>\n<strong>ps<\/strong> \u2013 Read user manual<\/p>\n<p><strong>w username<\/strong> &#8211;\u00a0 Find Out Who Is Logged on And What They Are Doing. w command displays information about the users currently on the machine, and their processes.<\/p>\n<p><strong>top<\/strong><br \/>\nThe top program provides a dynamic real-time view of a running system i.e. actual process activity. By default, it displays the most CPU-intensive tasks running on the server and updates the list every five seconds.<\/p>\n<p><strong>uptime<\/strong><br \/>\ntell How Long The System Has Been Running<\/p>\n<p><strong>free &#8211; Memory Usage<\/strong><br \/>\nThe command free displays the total amount of free and used physical and swap memory in the system, as well as the buffers used by the kernel.<br \/>\n# free \u2013m\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Display free memory size in MB<br \/>\n# free -t \u2013m\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Displays a line containing the totals memory in MB<\/p>\n<h3><a href=\"scm\/operating-systems\/unix-linux\/20-vmstat-command-examples-in-linux-unix.html\" target=\"_blank\" rel=\"noopener\">vmstat<br \/>\n<\/a><br \/>\n<a href=\"scm\/operating-systems\/unix-linux\/linux-performance-monitoring-using-iostat-mpstat-and-vmstat.html\" target=\"_blank\" rel=\"noopener\">Linux Performance Monitoring using iostat, mpstat and vmstat<\/a><\/h3>\n<h3><a href=\"scm\/operating-systems\/unix-linux\/20-iostat-command-examples-in-linux-unix.html\" target=\"_blank\" rel=\"noopener\">iostat<\/a><\/h3>\n<h3><a href=\"scm\/operating-systems\/unix-linux\/20-pmap-commands-examples-in-linux-unix.html\" target=\"_blank\" rel=\"noopener\">pmap <\/a><br \/>\n<strong><br \/>\n<\/strong><a href=\"scm\/operating-systems\/unix-linux\/20-mpstat-command-examples-in-linux-unix.html\" target=\"_blank\" rel=\"noopener\">mpstat\u00a0<\/a><\/h3>\n<p><strong># strace &amp; truss &#8211; Debug the Execution of a Program in Linux<\/strong><br \/>\nTrace the Execution of an Executable<br \/>\n# strace ls<\/p>\n<p>Save the Trace Execution to a File Using Option -o<br \/>\nstrace -o output.txt ls<\/p>\n<p>Execute Strace on a Running Linux Process Using Option -p<br \/>\n# ps -C firefox-bin To get the process id<br \/>\n# sudo strace -p 1725 -o firefox_trace.txt<\/p>\n<p>Print Relative Time for System Calls Using Option -r<br \/>\n# strace -r ls<\/p>\n<p><strong>Networking troubleshooting tips<\/strong><\/p>\n<p><span style=\"text-decoration: underline;\">Hostname verification or setup tools<\/span><\/p>\n<ul>\n<li>hostname : To get hostname of server.<\/li>\n<li>hostname \u2013s : To get FQDN hostname of server<\/li>\n<li>more \/etc\/sysconfig\/network : To setup hostname and networking can enable or disabled.<\/li>\n<li>dnsdomainname : List or setup domainname.<\/li>\n<li>more \/etc\/hosts : Make sure at least localhost entry do exist.<\/li>\n<\/ul>\n<p><span style=\"text-decoration: underline;\">Ethernet configuration tools<\/span><\/p>\n<p><strong>service network reload|restart|stop|start :<\/strong> To reload (after changed made in ip config file)|restart|stop|start network interface with all properties.<\/p>\n<p><strong>route<\/strong><br \/>\nThe route command allows you to add static routes to the routing tabling.<\/p>\n<p><strong>traceroute (tracert in Windows)<\/strong><br \/>\nTraceroute displays the routers that are passed through to reach the destination.<\/p>\n<p><strong>dmesg<\/strong><br \/>\nWhen the system boots up, it prints number of messages on the screen that displays information about the hardware devices that the kernel detects during boot process.<br \/>\nThese messages are available in kernel ring buffer and whenever the new message comes the old message gets overwritten. You could see all those messages after the system bootup using the dmesg command.<\/p>\n<pre># dmesg | more<\/pre>\n<pre># dmesg | grep Memory<\/pre>\n<pre># dmesg\u00a0 | grep eth<\/pre>\n<pre><\/pre>\n<p><strong>ifconfig<\/strong><br \/>\nThe ifconfig command is used to display the local interface configuration (winipcfg for Windows) and to modify the configuration.<br \/>\nifconfig eth0 up|down : To enable|disable network interface<\/p>\n<p><strong>netstat<\/strong><br \/>\nThe network status command netstat displays status information about the network interfaces on the host machine. Netstat command displays the network related information such as network connections, routing tables, interface statistics.<br \/>\n-a\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Show both listening and non-listening sockets<br \/>\n-n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 prints the numeric forms of IP address<\/p>\n<p># netstat -ain \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Local interface status<br \/>\n# netstat -rn \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Routing table information<br \/>\n# netstat \u2013an\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Display Active Internet Connections and domain sockets using netstat<br \/>\n# netstat -tap\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Display Active Connections with Process ID and Program Name<br \/>\n# netstat \u2013-route\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Display Routing Table<br \/>\n# netstat &#8211;statistics &#8211;raw\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Display RAW network statistics<br \/>\n# netstat &#8211;tcp &#8211;numeric\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 List of TCP connection to and from the machine.<br \/>\nnetstat -tuplin\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 UNIX<\/p>\n<p><strong>iptables <\/strong><\/p>\n<p>To know which ports are running in the machine.<br \/>\n<strong>ping<\/strong><br \/>\nThe ping command allows you to determine that the:<\/p>\n<ul>\n<li>TCP\/IP stack is configured properly<\/li>\n<li>Network interface card is configured properly<\/li>\n<li>Default gateway and subnet mask is configured properly<\/li>\n<li>Domain name services is configured properly.<\/li>\n<\/ul>\n<p><strong># ping ipaddress<\/strong> to check if the ip address in connected with network and if host is alive or dead<br \/>\n<strong># ping 127.0.0.1\/localhost<\/strong> &#8211; to check TCP\/IP services is running properly or not. Checks that your TCP\/IP stack is working properly up to the NIC. If this fails, check to see if you have TCP\/IP services loaded.<br \/>\n<strong># ping &#8220;IP address of default gateway&#8221;<\/strong> &#8211; Checks that the NIC is working on the local subnet by pinging the local side of the default gateway which is a router. If this fails, check that TCP\/IP is bound to the NIC. Then check that the NIC&#8217;s IRQ, and base address are set properly both on the card itself and in the operating system&#8217;s interface configuration.<br \/>\n<strong># ping &#8220;domain name&#8221;<\/strong> if DNS name is correctly configured. If it fails, check that the DNS server&#8217;s IP address is entered in properly in the TCP\/IP configuration.<\/p>\n<pre><strong>arp<\/strong><\/pre>\n<pre><strong>address resolution protocol<\/strong><\/pre>\n<p><strong># arp <\/strong>\u00a0\u00a0&#8211; To see the IP to MAC address translation table<br \/>\n<strong># arp -a<\/strong> \u00a0-Use this command to see the IP to MAC address translation table if you are having problems connecting to other network hosts. It is a dynamic cache which updates every 120 seconds.<\/p>\n<p># more \/etc\/modules.conf : To see your network card configuration alias for eth0 exists or not.<br \/>\n# lsmod : To list loaded modules (read as drivers), here you need to see that eth0 module is loaded or not, if not loaded then use insmod to insert (load) driver.<br \/>\n# dhclient : Dynamic Host Configuration Protocol Client, run this if your Ethernet card is not getting ip from DHCP box on startup; this command does by default shows useful information.<\/p>\n<p><strong>To see if service blocked because of access control<\/strong><br \/>\n# iptables \u2013n \u2013L : To list all iptable rules; useful to see if firewall blocks service or not.<br \/>\n# service iptables stop|start : To start|stop iptables<br \/>\n# more \/etc\/xinetd.conf<\/p>\n<p><strong>sar <\/strong><br \/>\nsar is an excellent monitoring tool that displays performance data of pretty much every resource of the system including CPU, memory, IO, paging, networking, interrupts etc., Sar Collects, Reports (displays) and Saves the performance data<strong>.<\/strong><\/p>\n<p># sar \u2013u | more\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Display CPU Statistics using Sar Command<br \/>\n# sar \u2013d | more\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Display Disk IO Statistics using sar command<br \/>\n# sar -n DEV | more Display networking Statistics using sar command<br \/>\n# sar -n SOCK |more Display networking Statistics using sar command<br \/>\n# sar -n DEV -f \/var\/log\/sa\/sa24 | more \u00a0 To display the network counters from the 24th<br \/>\n# sar 4 5\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 You can also display real time usage using sar<\/p>\n<p><strong>lsof<\/strong><br \/>\nlsof stands for &#8220;ls open files&#8221;, which will list all the open files in the system. The open files include network connection, devices and directories. The output of the lsof command will have the following columns:<\/p>\n<p>COMMAND process name.<br \/>\nPID process ID<br \/>\nUSER Username<br \/>\nFD file descriptor<br \/>\nTYPE node type of the file<br \/>\nDEVICE device number<br \/>\nSIZE file size<br \/>\nNODE node number<br \/>\nNAME full path of the file name.<\/p>\n<p># lsof | more\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 View all open files of the system<br \/>\n# lsof | wc -l\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 How many files are open in the system at any given point<br \/>\n# lsof \u2013u ramesh\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 View open files by a specific user. A system administrator can use this command to get some idea on what users are executing on the system.<br \/>\n# lsof \/bin\/vi\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 it displays all users who are currently using vi<\/p>\n<p><strong>Some external Tools<\/strong><br \/>\niptraf &#8211; Real-time Network Statistics<br \/>\ntcpdump\u00a0 &#8211; Detailed Network Traffic Analysis<br \/>\nNagios &#8211; Server And Network Monitoring<br \/>\nCacti &#8211; Web-based Monitoring Tool<br \/>\nKDE System Guard &#8211; Real-time Systems Reporting and Graphing<br \/>\nGnome System Monitor &#8211; Real-time Systems Reporting and Graphing<br \/>\nnmap &#8211; scan your server for open ports.<br \/>\nlsof &#8211; list open files, network connections and much more.<br \/>\nntop web based tool &#8211; ntop is the best tool to see network usage in a way similar to what top command does for processes i.e. it is network traffic monitoring software. You can see network status, protocol wise distribution of traffic for UDP, TCP, DNS, HTTP and other protocols.<br \/>\nConky &#8211; Another good monitoring tool for the X Window System. It is highly configurable and is able to monitor many system variables including the status of the CPU, memory, swap space, disk storage,<br \/>\ntemperatures, processes, network interfaces, battery power, system messages, e-mail inboxes etc.<br \/>\nGKrellM &#8211; It can be used to monitor the status of CPUs, main memory, hard disks, network interfaces, local and remote mailboxes, and many other things.<br \/>\nvnstat &#8211; vnStat is a console-based network traffic monitor. It keeps a log of hourly, daily and monthly network traffic for the selected interface(s).<br \/>\nhtop &#8211; htop is an enhanced version of top, the interactive process viewer, which can display the list of processes in a tree form.<br \/>\nmtr &#8211; mtr combines the functionality of the traceroute and ping programs in a single network diagnostic tool.<\/p>\n<p>yum<br \/>\nRsync<br \/>\nrpm \u2013 Refer Cheat Book<\/p>\n<p><strong>Some Well known System services<\/strong><br \/>\nQUICK DNS Flush\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/etc\/rc.d\/init.d\/nscd restart<br \/>\n\/Proc file system &#8211; Various Kernel Statistics<br \/>\n# cat \/proc\/cpuinfo<br \/>\n# cat \/proc\/meminfo<br \/>\n# cat \/proc\/zoneinfo<br \/>\n# cat \/proc\/mounts<\/p>\n<p><strong>Questions<\/strong><br \/>\nWhat is MASK in output of ifconfig<br \/>\nUnderstand the output of ifconfig in linux such as RX packets and TX packets<br \/>\nSet ip address using commands line<\/p>\n<p><strong>Change Host name in RHEL<\/strong><br \/>\nChanges should be made in the following files.<br \/>\n\/etc\/hosts<br \/>\n\/etc\/sysconfig\/network<\/p>\n<p><strong>For finding your java process<\/strong><br \/>\njps -v\u00a0\u00a0\u00a0\u00a0\u00a0 For finding your java process.<br \/>\njstack PID\u00a0 To Get stack of threads inside jvm<\/p>\n<p><strong>If application running under different user than yourself<\/strong><br \/>\nsudo jps -v<br \/>\nsudo jstack 6172<\/p>\n<table border=\"0\" width=\"1464\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td valign=\"bottom\" nowrap=\"nowrap\" width=\"712\"><strong>QUICK DNS Flush<\/strong><br \/>\n\/etc\/rc.d\/init.d\/nscd restart<\/td>\n<td nowrap=\"nowrap\" width=\"752\">\/etc\/rc.d\/init.d\/nscd restart<\/td>\n<\/tr>\n<tr>\n<td valign=\"bottom\" nowrap=\"nowrap\" width=\"712\"><strong>Reference<\/strong><br \/>\n<a href=\"http:\/\/www.linuxhomenetworking.com\/wiki\/index.php\/Quick_HOWTO_:_Ch04_:_Simple_Network_Troubleshooting\">http:\/\/www.linuxhomenetworking.com\/wiki\/index.php\/Quick_HOWTO_:_Ch04_:_Simple_Network_Troubleshooting<\/a><br \/>\n<a href=\"http:\/\/www.cyberciti.biz\/tips\/linux-security.html\">http:\/\/www.cyberciti.biz\/tips\/linux-security.html<\/a><br \/>\n<a href=\"http:\/\/www.cyberciti.biz\/tips\/list-of-linux-troubleshooting-commandstools-part-1.html\">http:\/\/www.cyberciti.biz\/tips\/list-of-linux-troubleshooting-commandstools-part-1.html<\/a><br \/>\n<a href=\"http:\/\/www.princeton.edu\/~unix\/Solaris\/troubleshoot\/index.html\">http:\/\/www.princeton.edu\/~unix\/Solaris\/troubleshoot\/index.html<\/a><br \/>\n<a href=\"http:\/\/www.techbooksforfree.com\/intro_to_data_com\/page252.html\">http:\/\/www.techbooksforfree.com\/intro_to_data_com\/page252.html<\/a><br \/>\n<a href=\"unix-linux\/linux-performance-monitoring-using-iostat-mpstat-and-vmstat.html\">http:\/\/www.scmgalaxy.com\/unix-linux\/linux-performance-monitoring-using-iostat-mpstat-and-vmstat.html<\/a><\/p>\n<p><a href=\"http:\/\/www.tecmint.com\/20-advanced-commands-for-linux-experts\/\">http:\/\/www.tecmint.com\/20-advanced-commands-for-linux-experts\/<\/a><\/td>\n<td nowrap=\"nowrap\" width=\"752\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>su: Acquiring Superuser Status # su\u00a0 :- Acquire\u00a0 Superuser after entering password but home directory does not change # su [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":3667,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[54],"tags":[1996,1993,378,460,2003,1994,1995,1999,1998,1997,2000,2002,2001],"class_list":["post-358","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-unix-linux","tag-admin-linux-commands","tag-administrator","tag-commands","tag-linux","tag-linux-admin-commands-reference","tag-linux-commands","tag-linux-commands-for-administrators","tag-linux-commands-for-administrators-guide","tag-linux-commands-for-administrators-reference","tag-linux-commands-for-administrators-tutorials","tag-linux-commands-guide","tag-linux-commands-reference","tag-linux-commands-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Linux Commands for Administrator | Linux Admin Commands Reference - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-administrator\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux Commands for Administrator | Linux Admin Commands Reference - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"su: Acquiring Superuser Status # su\u00a0 :- Acquire\u00a0 Superuser after entering password but home directory does not change # su [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-administrator\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2014-07-21T00:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-27T09:52:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2014\/07\/linux-commands-administrato.png\" \/>\n\t<meta property=\"og:image:width\" content=\"600\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"scmgalaxy K\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"scmgalaxy K\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/linux-commands-for-administrator\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/linux-commands-for-administrator\\\/\"},\"author\":{\"name\":\"scmgalaxy K\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\"},\"headline\":\"Linux Commands for Administrator | Linux Admin Commands Reference\",\"datePublished\":\"2014-07-21T00:00:00+00:00\",\"dateModified\":\"2021-02-27T09:52:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/linux-commands-for-administrator\\\/\"},\"wordCount\":2543,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/linux-commands-for-administrator\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2014\\\/07\\\/linux-commands-administrato.png\",\"keywords\":[\"Admin Linux Commands\",\"Administrator\",\"commands\",\"Linux\",\"Linux Admin Commands Reference\",\"Linux Commands\",\"Linux Commands for Administrators\",\"Linux Commands for Administrators Guide\",\"Linux Commands for Administrators Reference\",\"Linux Commands for Administrators Tutorials\",\"Linux Commands Guide\",\"Linux Commands Reference\",\"Linux Commands Tutorials\"],\"articleSection\":[\"Unix - Linux\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/linux-commands-for-administrator\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/linux-commands-for-administrator\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/linux-commands-for-administrator\\\/\",\"name\":\"Linux Commands for Administrator | Linux Admin Commands Reference - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/linux-commands-for-administrator\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/linux-commands-for-administrator\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2014\\\/07\\\/linux-commands-administrato.png\",\"datePublished\":\"2014-07-21T00:00:00+00:00\",\"dateModified\":\"2021-02-27T09:52:11+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/linux-commands-for-administrator\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/linux-commands-for-administrator\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/linux-commands-for-administrator\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2014\\\/07\\\/linux-commands-administrato.png\",\"contentUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2014\\\/07\\\/linux-commands-administrato.png\",\"width\":600,\"height\":400,\"caption\":\"linux-commands-administrators\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/linux-commands-for-administrator\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux Commands for Administrator | Linux Admin Commands Reference\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\",\"name\":\"scmgalaxy K\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"caption\":\"scmgalaxy K\"},\"sameAs\":[\"http:\\\/\\\/www.DevOpsSchool.com\"],\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/scmgalaxy\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linux Commands for Administrator | Linux Admin Commands Reference - scmGalaxy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-administrator\/","og_locale":"en_US","og_type":"article","og_title":"Linux Commands for Administrator | Linux Admin Commands Reference - scmGalaxy","og_description":"su: Acquiring Superuser Status # su\u00a0 :- Acquire\u00a0 Superuser after entering password but home directory does not change # su [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-administrator\/","og_site_name":"scmGalaxy","article_published_time":"2014-07-21T00:00:00+00:00","article_modified_time":"2021-02-27T09:52:11+00:00","og_image":[{"width":600,"height":400,"url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2014\/07\/linux-commands-administrato.png","type":"image\/png"}],"author":"scmgalaxy K","twitter_card":"summary_large_image","twitter_misc":{"Written by":"scmgalaxy K","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-administrator\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-administrator\/"},"author":{"name":"scmgalaxy K","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102"},"headline":"Linux Commands for Administrator | Linux Admin Commands Reference","datePublished":"2014-07-21T00:00:00+00:00","dateModified":"2021-02-27T09:52:11+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-administrator\/"},"wordCount":2543,"commentCount":0,"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-administrator\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2014\/07\/linux-commands-administrato.png","keywords":["Admin Linux Commands","Administrator","commands","Linux","Linux Admin Commands Reference","Linux Commands","Linux Commands for Administrators","Linux Commands for Administrators Guide","Linux Commands for Administrators Reference","Linux Commands for Administrators Tutorials","Linux Commands Guide","Linux Commands Reference","Linux Commands Tutorials"],"articleSection":["Unix - Linux"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-administrator\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-administrator\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-administrator\/","name":"Linux Commands for Administrator | Linux Admin Commands Reference - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-administrator\/#primaryimage"},"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-administrator\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2014\/07\/linux-commands-administrato.png","datePublished":"2014-07-21T00:00:00+00:00","dateModified":"2021-02-27T09:52:11+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-administrator\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-administrator\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-administrator\/#primaryimage","url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2014\/07\/linux-commands-administrato.png","contentUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2014\/07\/linux-commands-administrato.png","width":600,"height":400,"caption":"linux-commands-administrators"},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-administrator\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Linux Commands for Administrator | Linux Admin Commands Reference"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102","name":"scmgalaxy K","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","caption":"scmgalaxy K"},"sameAs":["http:\/\/www.DevOpsSchool.com"],"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/scmgalaxy\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/358","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=358"}],"version-history":[{"count":2,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/358\/revisions"}],"predecessor-version":[{"id":3669,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/358\/revisions\/3669"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media\/3667"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=358"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=358"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=358"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}