This article has been just updated:
There may come a time in your computing life when you either desire or require a degree of knowledge regarding the Linux operating system. You might decide to explore Linux as an alternative operating system for your home computer. In some cases, you may need to display some proficiency with the software in order to perform your job. That’s how I first got involved with Linux.
After being introduced to the Linux machine that I would be using as a backup and recovery server, I began searching for information to help me survive. There is a wealth of informative websites, and over time I became more comfortable maneuvering around the system.
This overview is intended to get you started with Linux. It is not meant as an exhaustive reference guide. I will be providing links which offer more depth pertaining to the various aspects of the OS that are discussed in this guide.
So without further ado, let’s plunge into the workings of the Linux operating system.
Linux is free for anyone to use and is distributed under the GPLv2 license. It is a comprehensive operating system that has found many applications in diverse areas of the computing landscape. You can find Linux running on supercomputers as well as on small, embedded devices. Different Linux distributions are tailored to be more useful in various implementations.
There are a number of distinct pieces which comprise a distribution of the Linux OS. According to linux.com, they are:
The Bootloader – This software manages the computer’s boot process.
The Kernel – The kernel is the core of the system and takes care of managing the computer’s CPU, memory, and peripheral devices.
Daemons – Background services such as printing and scheduling are handled by daemons.
The Shell – Also known as the Linux command line, in the early days of the operating system this was the only way to control your computer. It required commands to be entered in a text interface. Modern, desktop implementations of Linux have made it possible to use the operating system without having to master the command line.
Graphical Server – This sub-system is responsible for displaying the graphics on your machine and is called the X server.
Desktop Environment – There are many different desktop environments such as GNOME, Cinnamon, and KDE. This is the window through which the user interacts with the operating system.
Applications – There are thousands of applications that can be downloaded and installed to extend to functionality of your Linux implementation. Some Linux distributions offer a centralized method for installing applications.
Before we dive deeper into the inner workings of Linux, let’s take a look at some of the commands which you will commonly need to execute when working with the operating system through the command line. These are just a few of the more than 1,000 Linux commands that are available. For further information and more commands, consult the linuxtrainingacademy.com.
That’s enough to get you started. As we mentioned above, there are many commands incorporated into Linux. Consult the training link supplied to further investigate the functionality built into the operating system.
The Linux operating system has an extensive default directory structure. According to linux.com, these are the directories that can be found by executing the “tree -L 1 /“ command. The directories we will be discussing are the top level directories located under the root directory. We will simply name the directories and state the contents that they hold.
There may be additional directories at the root level that are part of your particular Linux distro. Linux also creates subdirectories in most of the directories we have referenced above. You can explore them by using commands such as pwd, ls, and cd.
The ability of users and applications to access files and directories is based on their file permissions. In Linux, if you don’t have permission to use a file in a particular way, it’s not going to happen. According to booleanworld.com, these are the specific permissions that a file or directory can possess.
Linux further delineates the control a user can exercise over a file or directory by the use of groups. A group is a collection of zero or more users that may have common computing requirements. File and directory permissions are assigned to three entities:
User – these permissions impact the file’s owner.
Group – these permissions affect the group that owns the file. When the owner is in the group, User permissions are enforced.
Other – all other users are subject to these permissions.
Executing a ls -l command will return a list of files and their permissions. The file mode describes the type of entity and its permissions. It is ten characters long, with the first letter being a ‘d’ for a directory, a ‘-‘ for a file, or a ‘l’ for a link.
The next nine characters symbolically spell out the permissions for the User, Group, and Others respectively. Triplets of letters represent the permissions. For example, this would give everyone read, write, and execute permission for a file:
Where this takes away execute permission for the group and others.
So the letter indicates the permission is enabled and a dash shows it is not set. They are always assigned in the read, write, and execute order.
Permissions can also be represented as numeric values based on binary substitution of the characters.
Linux services and daemons are very similar animals. They are both essentially applications that run the background. They are not under the direct control of a user. System events may initiate action by the services or daemons.
Some examples of important daemons are:
cron – used to schedule command execution
lpd – manage printing
rpc.mountd – respond to mount requests
Linux services such as Apache and MySQL are likely to be running on your machine.
Devices files are special files that interact with device drivers to access hardware attached to your system. They are found in the /dev directory.
Linux machines are often employed as network gateways or firewalls. The reliability of the operating system, its cost-effectiveness, and its flexibility make it a prime candidate for use in servers and devices involved in networking. There are Linux distributions that are tailored to the needs of network administrators.
According to geekflare.com, here are some of the more useful Linux networking commands.
There are several Linux serial console programs which can be used for purposes such as testing and configuring the serial ports in your network installations. Among them are minicom, grub, and getty. Based on your specific distribution, additional tools may be available for use in network administration.
Now that you have a little background concerning Linux let’s take a look at how a typical session begins. We will use the command line for demonstration purposes, but many Linux distributions have intuitive user-interfaces that can be used to perform many of the same functions. We will see some of the concepts discussed above in action.
Here’s what we are going to do.
Log into the system, locate a file, run it, change permissions so no-one else can run it, and then log off. Let’s get started.
login username <enter> – Your username should have been assigned by your system administrator. You will be prompted for your password. Provide it and hit enter again.
You should be in your home directory. To verify, execute the pwd command. We are going to assume that the program you are going to run is located in /home/username/progs. Let’s go there by entering this command:
cd /home/username/progs ls -l
Now you are presented with all of the files that are in the /home/username/prog directory. You will see the file permissions, file owner, and group owner with the file name on the far right.
You have a program titled myTestProgram which currently has permissions set at –rwxrwxrwx, meaning that anyone can read, modify, and execute the program.
Since you are one of everyone, you can run it by simply typing its name and hitting enter.
Let’s assume that the program executed, but there is an issue you need to resolve before letting anyone else use it. You need to change the permissions with the chmod command as in this example:
chmod u=rwx,g=r,o=r myTestProgram
The result of this command is that only you can run the program. A look at the file permissions will show this:
Everyone else can only read the file. Now you can take your time and fix it before modifying permissions again to let others use your creation.
You can simply logout to end your session.
That’s it. You have successfully run a program in Linux and modified it so it cannot be used by others. With a little practice, you will soon be moving around the system like a pro.
You may be interested in trying Linux on a particular computer but not yet be ready to blow away the current operating system. Many Linux versions have what is called a “live” distribution, where you can run the OS from a CD or other external media without any changes to your hard drive.
This lets you check it out before making any commitment.
Once you are satisfied that the operating system indeed fits your needs, simply click on the install icon and a software wizard will guide you during installation. The wizard will help you determine if your machine meets the minimum requirements for the OS. You will also set up your wireless connection if you have one, as you will need to access the network to download additional software and updates.
Further details on trying and installing Linux can be found on this page at linux.com.
This overview provides a taste of what to expect from the Linux operating system. While it was once considered the operating system of experts or computer geeks, the newer, user-friendly distributions allow just about anyone to experiment with this powerful operating system. The links that are included in this article are a good starting point if you desire more thorough Linux knowledge. You just might find that Linux fills all of your computing needs and lets you escape from the monolithic major operating system vendors.
Linux users are considered to be tech-savvy individuals, but that doesn’t make them immune to data loss. The problem is that there are not nearly as many Linux file recovery resources on the web as there are resources aimed at Windows and macOS users. Fortunately for you, this article explains how to recover permanently deleted files on Linux using the best open source data recovery software.
Most Linux distributions implement a folder where deleted files are temporarily moved to enable their recovery. On Ubuntu, for example, this folder is called Trash, and you can find it here:
As long as deleted files are still in the Trash folder, you can easily recover them just by moving them to a different folder. It’s only when the Trash folder is emptied that files become permanently deleted and can be recovered only using specialized software.
The biggest difference between the two software applications is that TestDisk is designed to recover files by analyzing the file system and fixing related issues, while PhotoRec is designed to scan a storage device block by block to find recoverable files with the help of its large signature database.
Because of how TestDisk and PhotoRec work, it’s usually better to start with the former and move on to the latter only when necessary.
Recover permanently deleted files on Linux using TestDisk:
Recover permanently deleted files on Linux using PhotoRec:
PhotoRec can recover permanently deleted files from FAT, NTFS, exFAT, ext2/ext3/ext4, and HFS+ partitions.
Using just the two above-described software applications, you should be able to recover most permanently deleted files on Linux. To improve your future data recovery chances, even more, start backing up all important data as soon as possible.