Linux for beginners: with cloud-based use of the Linux OS growing exponentially, it might just be time for you to try it out for yourself
Don’t think you’ve ever been introduced to the Linux Operating System? You probably use it every day without even realizing it. After all, Linux servers run Google, Twitter, Facebook, and a whole pile of other major Internet sites.
Linux is virtually synonymous with the cloud. So if you plan on working with cloud-based projects, then it’s probably a good idea to pick up at least some Linux bare essentials. So that’s where we’re headed today: Linux for beginners.
By the way, Cloud Academy has a full introductory LPIC-1 101 Linux certification course to help you get started with Linux.
First, just for fun, here’s a short list of some stuff that runs on Linux:
- Android phones and tablets.
- 94% of the world’s supercomputers.
- Air traffic control systems.
- CERN, the world’s largest particle physics laboratory, relies upon Linux to power its huge particle accelerator.
- The New York Stock Exchange.
- Japanese high-speed rail.
- In 2004, Lockheed Martin delivered a Red Hat Linux-powered nuclear submarine to the US Navy (bug-free I hope!).
Linux is everywhere. If you want to be anywhere, then I suppose you’ll need at least a passing familiarity.
The many flavors of Linux
While the basic system (or “kernel”) is the same, the look and feel and the software ecosystem driving one Linux distribution can be quite different from another.
My personal favorite, for my day-to-day desktop work at least, is Ubuntu, and that’s what we’ll use for this guide. But here are some others you may have heard of:
- Fedora (Red Hat’s community edition)
- Linux Mint
Those are by no means the only ones out there, or even necessarily the biggest. But they’re great places to begin a Linux for beginners test.
Linux for beginners (on your PC)
The best way to learn Linux is to use it. So why not just try it out on your PC without even needing to install it? If you like what you see, but you might possibly still need Windows from time to time, it is possible to install them both side-by-side as a dual boot. This means, that when your PC starts up, you get to choose whether to launch Windows or Linux.
Linux for beginners on AWS
Another way to try out Linux is by launching an Amazon EC2 instance and playing around with it there. This has the added benefit of not requiring that you make any scary changes to your own PC. You’ll be able to choose from a number of Linux distributions and, once you are finished, you can just delete the instance completely without consequence.
OK. I’ve got Linux Installed. Now what?
Assuming that you are at the “Linux for beginners” stage, let me walk you through some basic Linux commands to help you find your way around a little easier. When you log in to a Linux session, you will find yourself in your user’s home directory. Let’s start from there.
Note: The following commands were all executed on an Ubuntu machine installed on my personal PC.
pwd – Print Working Directory
Running pwd from the command line will show you exactly where you are in the system directory tree. As you can see from my example, I am in /home/mick – which is my user’s home directory. This can be useful if you’re ever unsure exactly “where” you are.
ls – List the contents of your current directory
cd – Change Directory
The cd command lets you navigate from directory to directory on your system. In the example above,
changes my directory to ~/Documents. The “~” stands for my home directory, so the full path of my new directory is really /home/mick/Documents.
Following cd, I ran
-al adds two parameters to the ls command, where ‘a’ shows all files – including any hidden files and folders, and ‘l’ displays a longer, more detailed directory list.
Here, I copied the file keepass.key into /home/mick, then I ran
Where the two dots mean move “up” one directory. This brings us back to /home/mick. The final ls command displays the keepass.key we’ve just copied.
top displays the currently running system processes that are taking up the most memory and compute resources.
Some common syntax you will find across most Linux distributions
- The command comes first (before parameters and arguments).
- In help documentation, parameters that are to be supplied by the user are displayed within <angle brackets> – with the text inside the brackets acting as a description.
- Optional parameters are displayed within [square brackets].
- If a parameter value must be chosen from a defined set, then the different options are separated by the pipe symbol, “|”, representing “or”.
Some other useful “Linux for beginners” Commands
- find – Find a file on the filesystem.
- man – Displays a command’s manual.
- clear – clear the screen.
- nano – a simple text editor.
- sudo or su – execute a command as super-user.
- rm – Removes one or more files.
- rmdir – Remove an empty directory.
- mkdir – Make a directory.
- ps – Provides a list of currently running processes.
- mv – Move a file (this is also used to rename a file. “Moving” it from one file name to another).
- grep – The global regular expression print program lets you search through a file or output of another program.