Architecture of Linux
Architecture of Linux
Let's first start with the basic knowledge of the Linux operating system.
On the other hand, Linux OS is one of the famous versions of the UNIX OS. It is
developed to provide a low-cost or free OS for several personal computer system
users. Remarkably, it is a complete OS Including an X Window System, Emacs
editor, IP/TCP, GUI (graphical user interface), etc.
o Monolithic Kernel
o Micro kernels
o Exo kernels
o Hybrid kernels
2. System Libraries:- These libraries can be specified as some special functions. These
are applied for implementing the operating system's functionality and don't need code
access rights of the modules of kernel.
4. Hardware layer:- Linux operating system contains a hardware layer that consists of
several peripheral devices like CPU, HDD, and RAM.
5. Shell:- It is an interface among the kernel and user. It can afford the services of
kernel. It can take commands through the user and runs the functions of the kernel.
The shell is available in distinct types of OSes. These operating systems are categorized
into two different types, which are the graphical shells and command-line shells.
The graphical line shells facilitate the graphical user interface, while the command line
shells facilitate the command line interface. Thus, both of these shells implement
operations. However, the graphical user interface shells work slower as compared to
the command-line interface shells.
There are a few types of these shells which are categorized as follows:
o Korn shell
o Bourne shell
o C shell
o POSIX shell
Linux Operating System Features
Some of the primary features of Linux OS are as follows:
o Portable: Linux OS can perform different types of hardware and the kernel of
Linux supports the installation of any type of hardware environment.
o Open source: Linux operating system source code is available freely and for
enhancing the capability of the Linux OS, several teams are performing in
collaboration.
o Multiprogramming: Linux OS can be defined as a multiprogramming system.
It means more than one application can be executed at the same time.
o Multi-user: Linux OS can also be defined as a multi-user system. It means more
than one user can use the resources of the system such as application
programs, memory, or RAM at the same time.
o Hierarchical file system: Linux OS affords a typical file structure where user
files or system files are arranged.
o Security: Linux OS facilitates user security systems with the help of various
features of authentication such as controlled access to specific files, password
protection, or data encryption.
o Shell: Linux operating system facilitates a unique interpreter program. This type
of program can be applied for executing commands of the operating system. It
can be applied to perform various types of tasks such as call application
programs and others.
Drawbacks of Linux
o Hardware drivers: Most of the users of Linux face an issue while using Linux.
Various companies of hardware prefer to build drivers for Mac or Windows due
to they contain several users than Linux. Linux has small drivers for peripheral
hardware than windows.
o Software alternative: Let's take the Photoshop example which is a famous tool
for graphic editing. Photoshop exists for Windows; however, it is not available
in Linux. Also, there are some other tools for photo editing but the Photoshop
tool is more powerful as compare to others. Another example is MS office which
is not present for Linux users.
o Learning curve: Linux isn't a very user-friendly operating system. Hence, it
might be confusing for many beginners. Getting begun with Windows is
efficient and easy for many beginners; however, understanding Linux working
is complex.
We have to understand the command line interface and finding for newer
software is a little bit complex as well. When we face any issue in the OS, the
searching solution is very problematic. Also, there are various experts for Mac
and Windows as compare to Linux.
o Games: Several games are developed for Windows but unfortunately not for
Linux. Because the platform of Windows is used widely. So, the developers of
the games are more interested in windows.
Linux Operating System Applications
Linux is a billion-dollar corporation nowadays. Thousands of governments and
companies are using Linux operating system across the world because of lower money,
time, licensing fee, and affordability. Linux can be used within several types of
electronic devices. These electronic devices are easily available for users worldwide. A
few of the famous Linux-based electronic devices are listed below:
Linux Distribution
It is an OS that is composed of a software-based collection on Linux kernel or we can
say the distribution includes the Linux Kernel. It is supporting software and libraries.
We can obtain Linux-based OS by downloading any Linux distribution. These types of
distributions exists for distinct types of devices such as personal computers,
embedded devices, etc. Around more than 600 Linux distributions are existed and a
few of the famous Linux distributions are listed as follows:
o Deepin
o OpenSUSE
o Fedora
o Solus
o Debian
o Ubuntu
o Elementary
o Linux Mint
o Manjaro
o MX Linux
The primary difference between window and Linux is that window is open source and
free OS and its Linux distribution based on Debian, Whereas Linux is a large collection
of open-source OSes that are working based on Linux kernel.
Kernel executes all the processes and facilitates various services of a system to the
processes. Also, it facilitates secured access to processes to hardware.
The support code that is not needed to execute in kernel mode is inside the system
library. The user programs and other types of system programs are implemented in
the user mode.
It includes no access to kernel mode and system hardware. User utilities/programs use
the system libraries for accessing kernel functions to obtain low-level tasks of the
system.
Ex : $type cd
cd is a shell builtin
//specifying that cd is
internal type//
Ex : $type cat
cat is /bin/cat
6. Conclusion
Understanding internal and external commands is essential for efficient
Linux usage. Internal commands are built into the shell, whereas external
commands are stored separately and executed when required.
Directory Commands
directory-related commands are essential for navigating and managing the file
system. Here are some commonly used directory commands:
2. cd (Change Directory)
• Description: Changes the current directory.
• Syntax: cd [directory]
• Examples:
o Move to a specific directory:
$ cd /home/username/Documents
6. rm (Remove)
• Description: Removes files or directories.
• Syntax: rm [options] [file/directory]
• Common Options:
o -r: Recursively remove directories and their contents.
o -f: Force removal without prompting.
• Examples:
o Remove a file:
$ rm file.txt
o Remove a directory and its contents:
$ rm -r directory_name
7. cp (Copy)
• Description: Copies files or directories.
• Syntax: cp [options] [source] [destination]
• Common Options:
o -r: Recursively copy directories.
• Examples:
o Copy a file:
$ cp file.txt /home/username/Documents/
o Copy a directory:
$ cp -r directory_name /home/username/Documents/
8. mv (Move)
• Description: Moves or renames files or directories.
• Syntax: mv [options] [source] [destination]
• Examples:
o Move a file:
$ mv file.txt /home/username/Documents/
o Rename a file:
$ mv old_name.txt new_name.txt
2. cd (Change Directory)
• Description: Changes the current directory.
• Syntax: cd [directory]
• Examples:
o Move to a specific directory:
$ cd /home/username/Documents
o Move to the home directory:
$ cd ~
o Move up one directory level:
$ cd ..
6. rm (Remove)
• Description: Removes files or directories.
• Syntax: rm [options] [file/directory]
• Common Options:
o -r: Recursively remove directories and their contents.
o -f: Force removal without prompting.
• Examples:
o Remove a file:
$ rm file.txt
o Remove a directory and its contents:
$ rm -r directory_name
7. cp (Copy)
• Description: Copies files or directories.
• Syntax: cp [options] [source] [destination]
• Common Options:
o -r: Recursively copy directories.
• Examples:
o Copy a file:
$ cp file.txt /home/username/Documents/
o Copy a directory:
$ cp -r directory_name /home/username/Documents/
8. mv (Move)
• Description: Moves or renames files or directories.
• Syntax: mv [options] [source] [destination]
• Examples:
o Move a file:
$ mv file.txt /home/username/Documents/
o Rename a file:
$ mv old_name.txt new_name.txt
Copy
Delete
* rm: Deletes files and directories to keep your file system organized
Change ownership
* chown: Changes the ownership of files and directories to a different user or group
Search
* df: Reports how much disk space is being used by a file system
Download files
Manage files
* tar: Creates archive files, also known as tarballs, to store multiple files
Linux general purpose utility command list man, who, cat, cd, cp, ps, Is, mv, rm,
mkdir, rmdir, echo, more, date, time, kill, history, chmod, chown, finger, pwd, cal, logout,
shutdown.