Everyone was thrilled. A new semester had just begun. In came the professor, soon after he introduced himself, he asked. “What is an Operating System?” I thought, ok this should be easy. Statements like “set of programs,” “system software”, etc started popping in my head. But I was unable to summarize all these statements. I was not at fault. The Operating system does perform so many functionalities that it’s hard, to sum up in a statement.
–An operating system is an interface between the user of a computer and the computer hardware.
Typically, an operating system does 3 things.
- It works as an interface between the system and user by providing a Graphical User Interface (GUI) or Command Line Interface (CLI).
- Managing, ordering, launching, and halting the application execution.
- Providing system hardware resources to user applications.
Now that we have revised the concept of an operating system. Let’s investigate the Linux Operating System.
Linux is the Operating system of choice for almost all Operating system practical courses. Why is that? Is Linux better than Microsoft Windows operating systems? Here is the detail of “Linux Operating System”
LINUX OPERATING SYSTEM
Linux is an open-source operating system. Whereas, Microsoft operating systems are commercial. Being open-source means that the code used in the creation of the Linux operating system is available to everyone to view, edit and even contribute to the original Linux OS.
Linux operating system is highly customizable. In the start, just like Windows, Linux only had a command-line interface but now it is very advance in its capabilities. It has an even better graphical user interface than the famous Microsoft operating systems. Although core parts of the Linux operating system are common, there are numerous distributions of the system.
To answer the question of why practical OS courses use the Linux operating system, the reason is the high customizability and user-handling of system core. One cannot mess with the Windows operating systems. Whereas in Linux, you can practically control the whole operating system and play with hardware resources and processes directly. Secondly, you do not actually need to install the Linux operating system on your laptop. You can install and use it in a virtual environment. Do not worry we will explain that in a few seconds.
Is Linux better than Microsoft Windows operating systems?
May be or maybe not. There’s a lack of consensus on the topic. There are long debates available on the internet. But I suggest you find peace in the statement that “They both have valuable distinct features.” It is sort of like comparing the iPhone X with Galaxy A51.
How to Use the Linux Operating System
As mentioned before, to use the Linux operating system, there is no need for the actual installation of a Linux operating system on the laptop. You can use the Linux operating system in a virtual environment.
Installing the Linux operating system is an easy process. All you must do is to install a VirtualBox on your Windows. Create a virtual machine of type Linux. Allocate some space. Download the Ubuntu operating system image file from the internet and Install Ubuntu on the virtual machine. Once done you can work on the Linux operating system. But wait. What is Ubuntu?
Remember how we mentioned that there are numerous distributions of the Linux operating system. Well, Ubuntu is one of the free and open-source distributions. It has an amazing Graphical User Interface and you can easily find a system image of the operating system on the internet to install on your Virtual Machine.
Virtual Environment is not the only way to use the Ubuntu Operating system, you can install it just the way you install the Microsoft Windows on your laptop/desktop.
As we are answering all the questions that can pop in your head while reading this article, there’s a good chance that you too confuse Unix with Linux.
Unix vs Linux
Unix and Linux are different. But there is a relation between the two. Linux is like a child to the Unix operating system. Linux is not Unix, but it is fairly similar to the Unix architecture. You can say that Linux is a derivation of the Unix operating system.
How Linux Operating System Works
Here’s a diagram of how the Linux operating system acts as an interface between the system and user. You might already know that as computers only understand binary language i.e a language of 0’s and 1’s. But users use English, so there’s an obvious need for an interpreter.
You guessed it right! Shell is the interpreter that sits between the user and the system. A shell accepts instructions or commands fed by user in user understandable language. Shell translates user information to binary language which a computer can easily understand. In short, Shell is a language translator. There are several shells available like C shell, Bourne shell, Korn shell, etc. Each shell works differently to interpret the commands. Bash is the most common shell.
We will run our commands for this tutorial on Linux bash. Down below is the detail of some common commands that run on Linux.
How to Find a File in Linux
The “find” command is used for searching a file or a directory in Linux. This command is based on a simple conditional mechanism for finding the required resource. This command filters the objects recursively in Linux. By using the Linux operating system, the files and directories are processed as well using the “-exec” flag at the same time.
- The basic syntax of the find command in Linux is:
- Linux is case sensitive. Therefore, type the exact capital or small letters of your file name to find it. The “name” option is case sensitive whereas the “iname” option is not case sensitive. If you are looking for a file with the name “Hello.txt.” the following command will find it.
In Linux, you can find the file by using its name or extension. Use the “find” command for locating a specific file by its name or extension. The following example will find the *txt files in home directory:
How to Unzip a file In Linux
ZIP Is an archived file that supports data compression. A ZIP File contains different directories and files in a compressed format. The “unzip” Command is used in the Linux for unzipping the content of a zipped file.
Install unzip
Most of the Linux distributions do not have the “unzip” utility Installed on them by default. In the first step, the user will have to install the “unzip” utility by using the package manager on their Linux distribution. For installing the unzip on UBUNTU use the following command:
- The “unzip” command will simply extract all the contents of a file in a current directory if a proper option is not used. A user owns the file that he/she extracts/unzips in a directory.
- If the user is extracting the zip file to a directory, then the user should have “write permissions” on that directory. For example, if you download an installation of a software in ZIP file. Use the following command to extract the contents in the current directory:
The “unzip” command by default print all the file names that it is extracting when the extraction will be complete. A user can simply use the “-q” option to avoid the printing of these unnecessary messages. An example to suppress the printout of output messages when a compressed file named as “VLC media player” is extracted is as follows:
The “-d” command is used for unzipping a zip file to a different directory. The example of “-d” command is as follows. In this way, you can unzip a file to a different directory in Linux.
How to Add a User to A Group in Linux
Linux groups are known as units that are used for organization and administration of different accounts. Different types of privileges are defined in Linux groups. Sometimes, the Linux groups are also used for executing permissions for a resource that is shared. There are two types of groups in Linux. These two groups are known as primary groups and secondary groups. A primary group is created whenever a file is created by a user. In this case, the group of the file is set to primary group of the user. Secondary groups are used when many users are present in a group. Linux uses secondary groups to give certain permissions to different users.
- The basic structure of adding a user to a group in Linux is to use the command “usermod -a -G.” This command is followed by the group name and the username.
- It is important to use the “-a” command while adding the user to a new group. Omitting this “-a” will result in the removal of the users from the group that are listed in the command.
- For example, if you want to add user “john” to a group “organizers.” The syntax will be as follows:
- Single user can also be added to multiple groups by using a single command. the syntax of adding a user to multiple groups is as follows:
Open Source
Linux is an open source operating system. Linux is based on Linux kernel. Linux have different distributions. These distributions include Ubuntu, Mint, Fedora and Debian. As Linux is an open source operating system, therefore its code is available for public.
Linux is a secure operating system. Every program in Linux is authorized by the administrator. This feature makes Linux secure. Shell is known as the interpreter that is present between the user and the Linux system. The Command Line Interface (CLI) is used for typing commands in Linux. In Ubuntu, the terminal is opened for typing the commands. 4 types of commands are discussed in this article.
- “rmdir” and “rm” commands are used for removing the directories in Linux.
- “find” command is used for searching a file in Linux.
- For using the “unzip” utility in Linux, the users have to first download the “unzip” utility on their distribution of Linux. The “unzip” command will unzip the contents of a ZIP file in the required directory.
- Linux groups are used for administration of different accounts. The “usermod -a -G” command is used for adding a user to a group.
By using these commands, a user can easily remove a directory, find a file, unzip a file, and assign a new user to a group in Linux.