15 Useful Administration Shell Commands Linux

Hello reader,

Whether you are the primary user or just one of many on a Linux machine, there are terminal commands that can bring lots of useful information to you quickly.

Some of the useful ones include:

last last accepts arguments like -f for filename but alone displays the last user logged in which is recorded in var/log/wtemp. Example last -t showing the exact time they were logged in, which might be very helpful on a multiuser system to determine whether or not someone made a system change.

uptime uptime displays the number of logged in users as well as available resources. In a multiseat configuration uptime can tell you quickly whether there enough resources available to run updates or multiple resource heavy programs like virtual machines.

whoami whoami essentially just echoes the logged in user, however if you come back to a terminal and anything looks different it might be wise to run whoami, in case someone else logged in while you stepped away.

crontab -l and crontab -e crontab -l shows the list of automated tasks in the vi editor, crontab -e schedules new tasks. (vi editor familarity is helpful)

cp -p and cp -i copy and preserve

mv -i move and prompt before overwrite

rm removes files, accepts arguments like -r or -f

mkdir makes a directory

pwd print working directory (root/home/user)

ssh open a secure shell. This accepts arguments like -V to show version and accepts addresses such as ssh example@ which would attempt to open shell as username example on this local example  address.

ftp and sftp accepts addresses as above, and can be used with mput or mget for example, ftp (followed by) ftp > mput example.txt or ftp > mget example.txt *note sftp is “secure ftp.”

ifconfig shows all interfaces such as eth0, ifconfig accepts arguments and can be used to turn a service off or on, such as ifconfig eth0 up.

Within ifconfig you can assign everything from subnet masks and ip addresses to broadcast addresses.

iwconfig similar to above but for wireless interfaces.

netstat accepts arguments such as -a -at -s  and shows resulting port traffic.

nslookup not to be mistaken for whois as nslookup queries dns, and whois queries a database of recorded information.




Spread the love

166 thoughts on “15 Useful Administration Shell Commands Linux”

  1. An interesting dialogue is worth comment. I believe that it’s best to write more on this matter, it might not be a taboo subject but usually persons are not sufficient to speak on such topics. To the next. Cheers


  2. I’ve been surfing online more than three hours these days, yet I never found any fascinating article like yours. It¡¦s beautiful value sufficient for me. Personally, if all web owners and bloggers made just right content material as you did, the web can be much more useful than ever before.

  3. I’m not sure why but this blog is loading very slow for me. Is anyone else having this problem or is it a issue on my end? I’ll check back later and see if the problem still exists.


  4. I used to be more than happy to search out this net-site.I wanted to thanks in your time for this wonderful learn!! I undoubtedly enjoying each little bit of it and I’ve you bookmarked to take a look at new stuff you weblog post.


  5. I’m really enjoying the design and layout of your blog. It’s a very easy on the eyes which makes it much more enjoyable for me to come here and visit more often. Did you hire out a designer to create your theme? Superb work!


Leave a Reply

Your email address will not be published. Required fields are marked *