Linux Basics
Overview
Every operating system carries with it a unique heritage and philosophy. Apple's approach has been to limit its operating systems to their own hardware, which has created a system where everything is expected to just automatically work. Microsoft has taken the opposite approach, attempting to make their software work on almost any hardware while also hiding the more technical details from the user.
And then you have Linux.
Linux is what happened when a bunch of computer enthusiasts decided to carve their own path. One man's hobby project evolved into a large community effort, and since then it has grown into an open source operating system that's secure, incredibly easy to modify, and as powerful as ever.
With this unique heritage comes a unique view about how computers should work, and this can make it difficult for a Windows or MacOS user to adjust to using a Linux system. Perhaps the best way to explain Linux's viewpoint is to look at how it treats the average user - unlike Windows, it assumes that you know what you're doing, and if you ask nicely enough, it'll gladly obey - even if means breaking the operating system beyond repair.
Another unique trait of the Linux operating system is that it's designed to be as modular and customizable as possible. This has led to many people creating their own pre-packaged variations of the operating system, known as distributions (or distros for short). Every distro has its own style and feel to it, which has traditionally led to a lot of debates over which distro is best.
I'm going to leave that choice up to the reader. Instead, this page will cover topics that can help newcomers to Linux understand why and how things work on their new Linux system - regardless of what distro they've chosen.
Hold on to your penguins, it's time to begin.
And then you have Linux.
Linux is what happened when a bunch of computer enthusiasts decided to carve their own path. One man's hobby project evolved into a large community effort, and since then it has grown into an open source operating system that's secure, incredibly easy to modify, and as powerful as ever.
With this unique heritage comes a unique view about how computers should work, and this can make it difficult for a Windows or MacOS user to adjust to using a Linux system. Perhaps the best way to explain Linux's viewpoint is to look at how it treats the average user - unlike Windows, it assumes that you know what you're doing, and if you ask nicely enough, it'll gladly obey - even if means breaking the operating system beyond repair.
Another unique trait of the Linux operating system is that it's designed to be as modular and customizable as possible. This has led to many people creating their own pre-packaged variations of the operating system, known as distributions (or distros for short). Every distro has its own style and feel to it, which has traditionally led to a lot of debates over which distro is best.
I'm going to leave that choice up to the reader. Instead, this page will cover topics that can help newcomers to Linux understand why and how things work on their new Linux system - regardless of what distro they've chosen.
Hold on to your penguins, it's time to begin.
Users and Permissions
Linux is designed to function as a multi-user system. In other words, it expects multiple people to share the same computer, and uses a built-in permission system to control who may access what.
It's a reasonable idea - a family may only have one computer to share, and it makes sense that Janet wouldn't want her little brother reading her diary anymore than her father would want her to have unlimited access to the family's banking information.
But there's another reason for this permission system: since a user can only access their own files, they can't make major changes to the computer itself. This is very intentional, as it limits the damage that can be caused by malware. Let's say that little Brad downloads something "cool" and runs it even though he shouldn't. If this is a malicious program, then only his files might be corrupted or damaged. Janet's diary and their dad's finances remained safe and sound.
You might have seen something like this if you've been using Microsoft Windows for a while - it would be those windows that pop up asking if you really want to do something you just explicitly told your computer to do. They're meant to protect you, but it's worth pointing out that Windows didn't initially have something like this. By the time it adopted a permission-based file system, its users were already accustomed to accessing whatever they wanted. To them, having to ask permission to use their own computer was an intrusive annoyance, and many Windows users still try to disable or bypass it today (which is not ideal).
Fortunately, Linux handled this security system in a more elegant way. Each user has a special "home" directory that's maintained just for them. This is where users are intended to keep their personal files, and to help with that, most distros automatically provide directories for things like your downloads, documents, or music library.
Other files that are specific to you, such as configuration files and saved games, are also stored in your home directory. They're just hidden from view most of the time.
The really important thing about your home directory is that you should never need to worry about the computer asking about permissions while you're working in it. As far as the operating system is concerned, those are your files, so you have the right to do whatever you want with them. In fact, because everything that's unique to you is stored here, you'll rarely, if ever, need to venture out into other parts of the file system.
It's a reasonable idea - a family may only have one computer to share, and it makes sense that Janet wouldn't want her little brother reading her diary anymore than her father would want her to have unlimited access to the family's banking information.
But there's another reason for this permission system: since a user can only access their own files, they can't make major changes to the computer itself. This is very intentional, as it limits the damage that can be caused by malware. Let's say that little Brad downloads something "cool" and runs it even though he shouldn't. If this is a malicious program, then only his files might be corrupted or damaged. Janet's diary and their dad's finances remained safe and sound.
You might have seen something like this if you've been using Microsoft Windows for a while - it would be those windows that pop up asking if you really want to do something you just explicitly told your computer to do. They're meant to protect you, but it's worth pointing out that Windows didn't initially have something like this. By the time it adopted a permission-based file system, its users were already accustomed to accessing whatever they wanted. To them, having to ask permission to use their own computer was an intrusive annoyance, and many Windows users still try to disable or bypass it today (which is not ideal).
Fortunately, Linux handled this security system in a more elegant way. Each user has a special "home" directory that's maintained just for them. This is where users are intended to keep their personal files, and to help with that, most distros automatically provide directories for things like your downloads, documents, or music library.
Other files that are specific to you, such as configuration files and saved games, are also stored in your home directory. They're just hidden from view most of the time.
The really important thing about your home directory is that you should never need to worry about the computer asking about permissions while you're working in it. As far as the operating system is concerned, those are your files, so you have the right to do whatever you want with them. In fact, because everything that's unique to you is stored here, you'll rarely, if ever, need to venture out into other parts of the file system.
The Super User
As useful as the home directories are, eventually you'll need to do something that requires a higher level of authority than your user account. This is when you call upon the Super User.
Instead of using a special "admin" account that can flaunt the permission system, Linux gives users the ability to temporarily issue commands as the Super User, also known as the root account. This is done by opening a terminal and using the sudo command. "sudo" stands for "Super User, Do ____", and when you use it to issue a command, your computer understands that the command is to be performed by the Super User instead of you.
One of the main reasons you'll call upon the Super User is to install, remove, or update software on your computer. As another protective measure against malware, only the Super User has access to the directories where your programs are stored. That's why you'll always see the package managers (discussed below) paired with the sudo command - nobody else has the authority needed to use them.
There are just three things to keep in mind about the Super User:
Instead of using a special "admin" account that can flaunt the permission system, Linux gives users the ability to temporarily issue commands as the Super User, also known as the root account. This is done by opening a terminal and using the sudo command. "sudo" stands for "Super User, Do ____", and when you use it to issue a command, your computer understands that the command is to be performed by the Super User instead of you.
One of the main reasons you'll call upon the Super User is to install, remove, or update software on your computer. As another protective measure against malware, only the Super User has access to the directories where your programs are stored. That's why you'll always see the package managers (discussed below) paired with the sudo command - nobody else has the authority needed to use them.
There are just three things to keep in mind about the Super User:
- You'll need to supply your account password to even use the sudo command. This is yet another preventative security measure, so have your password ready if you're going to call upon the Super User for anything.
- Any directories or files created by the Super User are considered to be "owned" by them. This means that if the Super User creates a file or folder in your home folder, you won't be able to access it.
- Using the sudo command is a privilege, not a right. Only trusted user accounts should have the privilege to use the sudo command. To continue the example from earlier, it's unlikely that Janet or Brad have access to the sudo command. Their father's account, however, most likely does.
Blocking access to the sudo command prevents malware from getting around the permission system, and thus it keeps the computer secure.
Package Managers
While the only thing stopping you from manually sorting out the programs you want and placing their files in the expected places is the ridged permission system, most modern Linux distros expect you to use what's known as a package manager.
Package managers, as the name suggests, help you manage "packages". These are special files that tell the system how to install or remove programs and their associated files. Most of the larger distros maintain their own online collection of packages, known as repositories, for the convenience of their users.
Popular package managers include dpkg, Snap, Pacman, and RPM. Note that certain families of distros tend to favor specific package managers - for example, distros that were derived from Debian tend to prefer dpkg.
You'll usually need to use the terminal in order to interact with a package manager, but this is rarely difficult to do. Take the command sudo apt install enigma. These four words tell the Super User to use the package manager apt to download and install the package named enigma.
For the curious, Enigma is an odd little puzzle game. Feel free to give it a try.
Many newer distros have also come out with a tool that resembles an App store. These allow you to browse the possible options and handle any package manager related tasks without requiring you to know the names of the different packages.
Package managers, as the name suggests, help you manage "packages". These are special files that tell the system how to install or remove programs and their associated files. Most of the larger distros maintain their own online collection of packages, known as repositories, for the convenience of their users.
Popular package managers include dpkg, Snap, Pacman, and RPM. Note that certain families of distros tend to favor specific package managers - for example, distros that were derived from Debian tend to prefer dpkg.
You'll usually need to use the terminal in order to interact with a package manager, but this is rarely difficult to do. Take the command sudo apt install enigma. These four words tell the Super User to use the package manager apt to download and install the package named enigma.
For the curious, Enigma is an odd little puzzle game. Feel free to give it a try.
Many newer distros have also come out with a tool that resembles an App store. These allow you to browse the possible options and handle any package manager related tasks without requiring you to know the names of the different packages.
Folder System
If you've used Microsoft Windows or DOS for any length of time, you're probably seen how they treat storage media using drive letters. Drives A and B are reserved for floppy disks, drive C is the default internal hard drive, and drive D is the CD-ROM / DVD / Blu-ray drive.
Linux doesn't follow this pattern. Instead, it uses a hierarchal directory structure that assigns special files or folders to different file systems.
At the top of the hierarchy is the root directory, written as /. Below this lies a series of predefined directories, each of which are meant to be used for very specific things.
To begin with, there's the home directory that every user has. All of the home directories are found under /home, and your personal home directory uses your user account's name (eg, /home/janet).
Other important predefined directories include /etc, which is where the global configuration files are kept, and /var, which stores logs and other things that are expected to change often. /media (or /mnt, depending on your distro) is where external drives and disks are made available.
As a general rule, you shouldn't touch the files in the other top level directories without very good reason.
Linux doesn't follow this pattern. Instead, it uses a hierarchal directory structure that assigns special files or folders to different file systems.
At the top of the hierarchy is the root directory, written as /. Below this lies a series of predefined directories, each of which are meant to be used for very specific things.
To begin with, there's the home directory that every user has. All of the home directories are found under /home, and your personal home directory uses your user account's name (eg, /home/janet).
Other important predefined directories include /etc, which is where the global configuration files are kept, and /var, which stores logs and other things that are expected to change often. /media (or /mnt, depending on your distro) is where external drives and disks are made available.
As a general rule, you shouldn't touch the files in the other top level directories without very good reason.
The Terminal
At the start of this page, I mentioned how the big three operating systems have evolved over time, and that is particularly relevant here. Over time, Windows has moved away from its DOS roots, and today, the vast majority of its users have never seen a command line, let alone used it for anything. Linux, being an operating system for computer enthusiasts, went boldly in the opposite direction, and expects its users to use the terminal regularly.
Among other things, it's the main way you'll interact with the Super User. You'll also encounter a lot of programs that are only meant to be run via the command line, as they don't even have a GUI.
Now, using a command line can be intimidating, and so many newer distros have been trying to move away from the command line by offering GUI equivalents of many of its common features. But as nice as these new tools are, they haven't made the command line completely optional just yet.
Since the terminal is such a vital piece of the Linux system, opening a terminal window is usually trivial - for example, there should be a shortcut in the distro's start menu equivalent, and you may also find it available in the menus that appear when you right-click in a folder.
The trick from there is using it effectively. Linux typically uses a different set of commands than DOS, so being familiar with one doesn't help much when you're using the other.
Fortunately, just like DOS, you won't need to remember everything. The commands in the table below are enough to get around and do most of the things you need to do.
Feel free to bookmark or print this page out if you need a quick reference.
Among other things, it's the main way you'll interact with the Super User. You'll also encounter a lot of programs that are only meant to be run via the command line, as they don't even have a GUI.
Now, using a command line can be intimidating, and so many newer distros have been trying to move away from the command line by offering GUI equivalents of many of its common features. But as nice as these new tools are, they haven't made the command line completely optional just yet.
Since the terminal is such a vital piece of the Linux system, opening a terminal window is usually trivial - for example, there should be a shortcut in the distro's start menu equivalent, and you may also find it available in the menus that appear when you right-click in a folder.
The trick from there is using it effectively. Linux typically uses a different set of commands than DOS, so being familiar with one doesn't help much when you're using the other.
Fortunately, just like DOS, you won't need to remember everything. The commands in the table below are enough to get around and do most of the things you need to do.
Feel free to bookmark or print this page out if you need a quick reference.
| Command | Parameters | Mneumonic / Action |
| cat | file1 file2 file3... |
Concatenate Display the contents of a file or files on the command line. By naming multiple files, you can join them together as a single file using redirection. This doesn't work too well on files that aren't plain text, however. |
| cd | new_location |
Change Directory Move the working directory to a new location in the file system. To go back up the list, use .. as the parameter. You can also use cd / to jump to the root folder, or cd ~ to jump to your home directory. |
| clear |
Clear Screen Clear the terminal's screen. Especially useful if a lot (or too much) information was just printed out. |
|
| cp | target, new_location |
Copy Copy a file to a new location. To copy an entire folder, use cp -r target, new_location. |
| rm | target_file_name |
Remove Remove the file with the given name. Be careful with this one, as it's possible to do some real damage to your computer if you type the command wrong. Remember: Unlike Windows, Linux assumes you know what you're doing and does exactly what you tell it to do. |
| ls | folder_name |
List Directory List all of the files within a directory. If the folder_name parameter is omitted, this will list the files in the current directory. |
| mkdir | target_folder_name |
Make Directory Create a new folder with the provided name. |
| mv | target, new_name |
Move "Moves" an existing file or folder to a new location by changing its name. This has annoyed enough people that there are various "rename" utilities available to provide the same function. |
So What's with the Penguins?
The short answer is that the guy who created Linux all those years ago thinks penguins are cool, and for a time everybody wanted their company to have a mascot. This led to the adoption of a penguin named Tux as the mascot of the Linux operating system.
Tux appears in a lot of Linux related media, including several games, like Super Tux.
Tux appears in a lot of Linux related media, including several games, like Super Tux.
Wrapping things up
The main reason Linux seems alien to a lot of people is because it doesn't follow the same "rules" that Windows does. It has a different core audience, and follows the beat of a different drummer.
Once you stop trying to make Linux work like Windows, things smooth out and you can get a lot of things done with ease.
Hopefully this page has made Linux feel a lot more approachable - or at least, made working with it more comfortable.
Once you stop trying to make Linux work like Windows, things smooth out and you can get a lot of things done with ease.
Hopefully this page has made Linux feel a lot more approachable - or at least, made working with it more comfortable.