The Get Sh*t Done Server

Linux Shell Basics

So now we're getting down to brass tacks, learning how to quickly get the knowledge we need to act upon. We're going to be learning the basics and how to use the Linux Shell...

A lot of the content in here has been borrowed from the amazing site - It's a superb resource and one, alongside, I suggest you take a lot of time to research and learn from.

William Shotts, the creator of the LinuxCommand site has very graciously allowed other sites to copy and distribute his content but asks for his copyright notice to be included. So, with great honour I am happy to include it below.

© 2000-2016, William E. Shotts, Jr.Verbatim copying and distribution of this entire article is permitted in any medium, provided this copyright notice is preserved.

Linux® is a registered trademark of Linus Torvalds.

Why Should we Learn Command Line Basics?

Why do you need to learn the command line anyway? Well, let me tell you a story. A few years ago we had a problem where I used to work. There was a shared drive on one of our file servers that kept getting full. I won't mention that this legacy operating system did not support user quotas; that's another story. But the server kept getting full and it stopped people from working. One of our software engineers spent the better part of a day writing a C++ program that would look through all the user's directories and add up the space they were using and make a listing of the results. Since I was forced to use the legacy OS while I was on the job, I installed a Linux-like command line environment for it. When I heard about the problem, I realized I could do all the work this engineer had done with this single line:

du -s * | sort -nr > $HOME/user_space_report.txt

Quite simply it's so much quicker, easier and more efficient to get stuff done for quick tasks. Whether it be editing an .htaccess file for Apache, or sorting through log files to see if Googlebot has visited recently or upgrading PHP or other applications, using the command line (or Shell as it's called) is fast, efficient and gets you to your goals faster.

Command Line Basics


Simple Grep for Googlebot?