What Is Linux Operating System
What Is Linux Operating System
Linux is based on the UNIX operating system. UNIX is a powerful, multi-user, multitasking operating
system originally developed in the 1970s at AT&T Bell Labs. It laid the foundation for many modern
operating systems, including Linux.
Linux combines a wide range of open-source tools and components to form a complete computing
environment. These components include file systems, user interfaces, system utilities, and
application programs all working together to manage hardware and enable users to interact with
their computer systems.
To create a full and functional system, the Linux is combined with a collection of software packages
and utilities, which are together called Linux distributions.
What is a “distribution?”
Linux distribution is an operating system that is made up of a collection of software based on Linux
kernel or you can say distribution contains the Linux kernel and supporting libraries and software.
And you can get Linux-based operating system by downloading one of the Linux distributions and
these distributions are available for different types of devices like embedded devices, personal
computers, etc.
Around 600 + Linux Distributions are available and some of the popular Linux distributions are:
MX Linux
Manjaro
Linux Mint
elementary
Ubuntu
Debian
Solus
Fedora
openSUSE
Deepin
Because it is free, open-source, and extremely flexible, Linux is widely utilized. For servers and
developers, it is the ideal option because it offers strong security, stability, and performance.
Generally interoperable hardware, a broad software library, and a vibrant community that offers
support and regular updates are the many benefits of Linux. Due to its adaptability, users can
customize the operating system according to their own needs, whether they become for personal or
large enterprise use.
Architecture of Linux
1. Kernel: Kernel is the core of the Linux based operating system. It virtualizes the common
hardware resources of the computer to provide each process with its virtual resources. This
makes the process seem as if it is the sole process running on the machine. The kernel is also
responsible for preventing and mitigating conflicts between different processes. Different
types of the kernel are:
Monolithic Kernel
Hybrid kernels
Exo kernels
Micro kernels
2. System Library: Linux uses system libraries, also known as shared libraries, to implement
various functionalities of the operating system. These libraries contain pre-written code that
applications can use to perform specific tasks. By using these libraries, developers can save
time and effort, as they don't need to write the same code repeatedly. System libraries act as
an interface between applications and the kernel, providing a standardized and efficient way
for applications to interact with the underlying system.
3. Shell: The shell is the user interface of the Linux Operating System. It allows users to interact
with the system by entering commands, which the shell interprets and executes. The shell
serves as a bridge between the user and the kernel, forwarding the user's requests to the
kernel for processing. It provides a convenient way for users to perform various tasks, such as
running programs, managing files, and configuring the system.
4. Hardware Layer: The hardware layer encompasses all the physical components of the
computer, such as RAM (Random Access Memory),HDD (Hard Disk Drive), CPU (Central
Processing Unit), and input/output devices. This layer is responsible for interacting with the
Linux Operating System and providing the necessary resources for the system and
applications to function properly. The Linux kernel and system libraries enable
communication and control over these hardware components, ensuring that they work
harmoniously together.
5. System Utility: System utilities are essential tools and programs provided by the Linux
Operating System to manage and configure various aspects of the system. These utilities
perform tasks such as installing software, configuring network settings, monitoring system
performance, managing users and permissions, and much more. System utilities simplify
system administration tasks, making it easier for users to maintain their Linux systems
efficiently.
The Linux operating system is widely used across various domains due to its flexibility, security, and
open-source nature
Servers and Hosting: Powers web servers, cloud infrastructure, and database management
systems.
Desktop and Personal Use: Provides secure and customizable desktop environments.
Cybersecurity: Essential for ethical hacking, penetration testing, and security research.
Embedded Systems: Runs lightweight devices like routers, IoT gadgets, and smart appliances.
Choosing the right Linux distribution depends on your needs and experience level:
For Beginners: Ubuntu is ideal for new users due to its user-friendly interface and strong
community support. Linux Mint is another beginner-friendly option, offering a Windows-like
experience.
For Advanced Users: Arch Linux is favored for its minimalism and deep customization.
Gentoo is another powerful option for users who want full control but are ready for a steep
learning curve.
For Developers: Fedora is popular for its cutting-edge tools and suitability for testing and
development. Debian stands out for its stability and vast package repository, making it great
for both development and production.
For Lightweight Systems: Lubuntu is frequently picked by users either like lightweight
operating systems or have outdated equipment due to its ability to utilize system resources
efficiently while maintaining functionality. Another slim option is Puppy Linux, that is made
to run well on outdated hardware while maintaining the essential functions and applications.
Installing Linux
Selecting a Ubuntu, Fedora, or Linux Mint distribution which suits your needs is the initial step in the
straightforward procedure for installing Linux.
I
nstalling Linux on bootable USB drive
Download the ISO file first from the distribution's official website.
Next, utilize an application like Etcher for macOS and Linux or Rufus for Windows to create a
bootable USB drive.
Following you insert the USB drive into your computer and restart it.
After that you may set the USB drive as the primary boot device by traversing to the BIOS or
UEFI settings.
Upon booting from the USB the hard drive, the Linux setup will show up.
To partition the drive, choose your time zone, create user accounts, and change system
settings.
When the installation concludes, disconnect the USB drive and turn on your computer
normally.
For more detailed way to install the Linux Mint Refer this link.
For Debian-based systems (like Ubuntu), use package managers like apt
Software centers are another source for a graphical application installation and searching
interface.
For Python installation specifics, detailed guidance can be found in the provided link.
Advantages of Linux
The main advantage of Linux is it is an open-source operating system you can contribute,
modify, and distribute the code freely.
In terms of security, Linux is more secure than any other operating system and does not
require any anti-virus software.
It provides high stability it rarely slows down or freezes and there is no need to reboot it
after a short time.
Disadvantages of Linux
Linux Commands
Basic tools for utilizing the command line interface (CLI) to communicate with the operating system
are Linux commands. Commonly used commands like:
Package management differs depending on the distribution; Fedora-based machines use dnf, while
Debian-based systems use apt. Commands like cat, grep, awk, and sed are required for editing text
files. Knowing and performing these directions well enables. For clear understanding about the Linux
commands refer this link.
Linux History
In 1991, Linus Torvalds created the Linux kernel, inspired by UNIX operating system and the MINIX
operating system, to make a flexible and affordable system for personal computers. Developers
around the world quickly joined in to improve it, leading to the creation of full Linux systems known
as distributions.
Over the years, Linux has become known as a key component of modern computing, powering
everything from servers and personal computers to supercomputers and smartphones. Due to its
flexibility, durability, and strong community support, developers, businesses, and educational
institutions frequently opt for it
LINUX stands for Lovable Intellect Not Using XP. Linux was developed by Linus Torvalds and named
after him. Linux is an open-source and community-developed operating system for computers,
servers, mainframes, mobile devices, and embedded devices. Linux receives requests from system
programs and it relays them into computer hardware. Linux is flexible, reliable, secure and it has
large community user's support. Linux is compatible with almost every possible file format and can
run on a large number of devices.
Linux is a multi-programming, multi-user operating system, it means the same system can be used by
different users with different access rights and simultaneously many applications can be run on it.
Characteristics of Linux
Linux is open source, so it is free to use and users can also work on enhancing features of the
Linux operating system.
It is multi-use operating system, that means multiple users can access the system.
Advantages of Linux
Linux is free of cost so it is easily available for users to download and use.
It is enhancing day by day as users can make changes in the Linux operating system.
Linux does not collect much user data, so it ensures privacy of user.
Disadvantages of Linux
Linux does not provide some hardware drivers which is drawback of Linux.
Some graphic tools are not available for Linux operating system.
Linux does not have standard versions, which makes difficult for users to choose best version
for their needs
Linux: Linux could be a free and open supply OS supported operating system standards. It provides
programming interface still as programme compatible with operating system primarily based systems
and provides giant selection applications. A UNIX operating system additionally contains several
severally developed parts, leading to UNIX operating system that is totally compatible and free from
proprietary code.
Windows: Windows may be a commissioned OS within which ASCII text file is inaccessible. it’s
designed for the people with the angle of getting no programming information and for business and
alternative industrial users. it’s terribly straightforward and simple to use. The distinction between
Linux and Windows package is that Linux is completely freed from price whereas windows is
marketable package and is expensive. Associate operating system could be a program meant to
regulate the pc or computer hardware Associate behave as an treater between user and hardware.
Linux is a open supply package wherever users will access the ASCII text file and might improve the
code victimisation the system. On the opposite hand, in windows, users can’t access ASCII text file,
and it’s a authorized OS. Let’s see that the difference between Linux and windows:
More efficient and stable, especially for Less efficient due to resource-intensive
5.
servers and developers. processes.
Uses forward slash (/) for directory Uses backslash (\) for directory
6.
separation. separation.
More secure with better user control and Less secure due to higher susceptibility to
7.
fewer vulnerabilities. malware and viruses.
11. In Linux, you can have two files with the In Windows, you cannot have two files
S.
No Linux Windows
Linux
Linux is a free and open-source operating system built on UNIX standards. It provides a programming
interface still as program compatible with operating system primarily based systems and provides
giant selection applications and it is highly customizable and widely used in servers,
development environments, cybersecurity, and embedded systems.
A UNIX operating system additionally contains several developed parts, leading to a UNIX operating
system that is totally compatible and free from proprietary code. Linux allows users to access,
modify, and distribute its source code, making it a preferred choice for developers, system
administrators, and ethical hackers.
Security & Stability: Linux is known for its robust security, providing built-in
user privilege control, fewer vulnerabilities, and better protection
against malware and viruses compared to Windows.
Lightweight & Efficient: Many Linux distributions, including Arch Linux and Linux Mint, are
lightweight and optimized for performance, making them faster than Windows, especially on
older hardware.
Diverse Software Support: The Linux ecosystem supports a vast range of applications, from
open-source alternatives to proprietary software. Users can install programs using package
managers like Pacman (Arch Linux), APT (Debian/Ubuntu), and DNF (Fedora).
Linux vs. Windows for Developers: Linux provides powerful tools, including terminal-based
programming, shell scripting, and support for multiple programming languages, making it
ideal for developers, DevOps engineers, and data scientists.
Linux Rolling Release Model: Distros like Arch Linux follow a rolling release model, ensuring
users always have the latest updates without needing to install a new version.
Servers & Cloud Computing: Linux dominates web servers, with distributions like
CentOS, Ubuntu Server, and Debian powering most of the internet and enterprise cloud
infrastructure.
Cybersecurity & Ethical Hacking: Tools like Kali Linux and Parrot OS make Linux the top
choice for penetration testing, network security, and ethical hacking.
Gaming on Linux: With improvements like Steam Proton, Lutris, and Wine, gaming on Linux
has significantly improved, allowing users to play Windows-based games with better
compatibility.
Windows
Windows is a proprietary operating system developed by Microsoft, designed for ease of use,
software compatibility, and business applications. Unlike Linux, which is an open-source operating
system, Windows restricts access to its source code, making it a closed-source OS where
modifications are not permitted by users.
Windows is widely used for personal computing, gaming, enterprise solutions, and office
environments, primarily due to its intuitive Graphical User Interface (GUI), plug-and-play
functionality, and extensive software ecosystem. It is ideal for users with no programming
knowledge, offering a simple point-and-click interface for effortless navigation.
One of the major differences between Linux and Windows is that Linux is free and open-source,
whereas Windows requires a paid license for installation and use. Different editions, such
as Windows 10 Home, Pro, and Enterprise, cater to various user needs, but they all require
a product key or subscription model (Windows 365) for activation.
Graphical User Interface (GUI): A visually appealing and easy-to-use environment with Start
Menu, Taskbar, and File Explorer.
Software Compatibility: Supports Microsoft Office, Adobe Suite, and a vast range of third-
party applications that are not available on Linux.
Gaming Performance: Offers DirectX, high-end GPU driver support (NVIDIA, AMD), and
compatibility with AAA games, making it the preferred choice for gamers.
Hardware Support: Works seamlessly with a wide range of printers, scanners, and USB
peripherals without needing additional drivers.
Regular Updates: Receives security patches and feature updates through Windows Update,
but major version upgrades require reinstallation (e.g., Windows 10 to Windows 11).
Note: While Windows excels in user-friendliness and software availability, it lacks the flexibility,
security, and customization found in Linux distributions. Since it is a closed-source operating system,
users cannot modify the source code, limiting customization compared to Linux-based systems like
Ubuntu, Arch Linux, and Fedora
Choosing between Linux and Windows depends entirely on your needs, technical expertise, and
usage preferences. Both operating systems excel in different areas, catering to different types of
users. Below is a breakdown to help you decide which OS suits you best.
You value security and privacy – Linux is inherently more secure, with fewer vulnerabilities
and better access control.
You want a free and open-source OS – No licensing fees, full access to source code, and
freedom to modify as needed.
You prefer customization and control – With distros like Ubuntu, Arch Linux, and Fedora, you
can fine-tune everything.
You are a developer or system administrator – Linux provides powerful command-line tools,
scripting capabilities, and server optimizations.
You work in cybersecurity or ethical hacking – Kali Linux and Parrot OS are widely used for
penetration testing.
You need a lightweight OS for old hardware – Linux runs efficiently on low-end machines
with minimal resource usage.
You want a rolling release model – Arch Linux and other distros provide continuous updates
without major version upgrades.
You need proprietary software like Microsoft Office or Adobe Photoshop – These
applications are natively supported on Windows.
You are a gamer – Windows has better gaming support with DirectX, NVIDIA/AMD drivers,
and compatibility with all major games.
You require seamless hardware compatibility – Windows supports printers, USB devices,
and peripherals without extra setup.
You prefer official customer support – Microsoft provides dedicated support for Windows
users, unlike Linux, which relies on community forums.
You are a business user or working in a corporate environment – Most businesses rely on
Windows-based applications for daily operations
A Linux distribution, often shortened to “distro,” is a packaged version of Linux that comes with the
Linux kernel plus a collection of software and utilities that make the OS functional and user-friendly.
Some distros are optimized for business environments, offering tools for productivity and enterprise
management, while others focus on multimedia enthusiasts, bundling advanced audio and video
editing software. Distributions for software developers come preloaded with compilers,
programming tools, and integrated development environments (IDEs).
Each distribution packages the necessary tools to perform specialized functions, ensuring users have
an optimized experience without requiring extensive setup. Whether you’re into creative multimedia
projects, writing code, managing servers, or simply browsing the web, there’s a Linux distribution
that fits your needs.
Every Linux distribution is built from essential components that work together to create a fully
functional operating system. These components ensure the system can manage hardware, run
software, and provide a seamless user experience -
1. Linux Kernel: It is the core of every Linux distribution. It manages hardware resources, provides
device drivers, and handles low-level system functions like memory management and process
scheduling. The kernel acts as a bridge between the hardware and the software, enabling seamless
interaction.
2. System Libraries and Utilities: System libraries, such as the GNU C Library (glibc), play a crucial
role in providing standard functions and APIs that applications use to interact with the kernel. These
libraries are essential for running programs and executing system calls effectively.
3. User Interface (UI): Linux distributions offer two primary types of user interfaces -
Graphical User Interfaces (GUIs): Popular GUIs like GNOME, KDE, and Xfce provide a user-
friendly visual environment for interacting with the system.
Command-Line Interface (CLI): For more advanced users, the CLI offers direct control of the
system through terminal commands.
4. Software Packages: Distributions come preloaded with various software packages tailored for
specific use cases. These include -
5. Package Management System: Package managers streamline the installation, update, and removal
of software. Each distribution uses its own package manager, such as -
6. Configuration and Customization: Linux distributions provide extensive tools to configure and
personalize the system. Users can adjust network settings, user accounts, security policies, and
display preferences. This flexibility allows Linux to be tailored for everything from personal use to
enterprise-level deployments.
7. Support and Community: Most Linux distributions have strong support networks, including
documentation, forums, and active communities. These resources allow users to seek help, learn
from others, and contribute to the development and improvement of their chosen distribution.
Here are some of the most popular Linux distributions, each with its own unique characteristics:
1. Ubuntu
Why it’s popular: Ubuntu is one of the most widely used Linux distributions, especially for
beginners. It’s user-friendly and has a large community, which means help is easy to find. It’s
also supported by most software vendors.
Features: Easy installation, long-term support (LTS) versions, and a large software repository.
2. Debian
Why it’s popular: Debian is known for its stability and is often used as the base for other
distros, like Ubuntu. It’s a great choice for those who want a solid, secure system and don’t
need the latest bleeding-edge features.
3. Fedora
Why it’s popular: Fedora is known for always having the latest software and technologies.
It’s backed by Red Hat, a major player in the enterprise Linux world, and is often used by
developers who want to work with cutting-edge technologies.
4. Arch Linux
Why it’s popular: Arch Linux is for those who want to fully customize their system. It’s a
rolling release distro, meaning it’s constantly updated, and it gives users complete control
over what gets installed on their system.
5. CentOS
Why it’s popular: CentOS is based on Red Hat Enterprise Linux (RHEL) and is commonly used
for server environments. It’s free and offers long-term stability, which is perfect for
businesses and data centers.
Why it’s popular: Linux Mint is an easy-to-use distribution that looks and feels similar to
Windows. It’s a good choice for users who are new to Linux and want something familiar.
Linux distributions are widely used because they provide a flexible, secure, and cost-effective
operating system. Here are the key reasons why Linux distributions are preferred:
Most Linux distributions are free to use and don’t require licensing fees.
They are open-source, allowing users to view, modify, and distribute the code.
2. Customizable
Linux allows users to modify the operating system’s appearance and functionality according
to their needs.
Users can choose from a variety of desktop environments, file systems, and tools.
3. Security
Linux is highly secure and less vulnerable to viruses and malware compared to many other
operating systems.
4. Resource-Efficient
Linux can run efficiently on older or low-spec hardware, extending the usability of older
machines.
Lightweight distributions like Lubuntu and Puppy Linux are designed for systems with limited
resources.
Linux distributions are ideal for software development due to their compatibility with
programming languages and tools.
6. Diverse Options
Linux offers a variety of distributions tailored to different use cases, such as personal use,
servers, gaming, or education.
Linux distributions are known for their stability, especially in server environments.
They are widely used in mission-critical systems due to their consistent performance.
A large global community provides extensive support through forums, wikis, and online
resources.
This makes troubleshooting and learning easier for users at all levels.
Choosing the right Linux distribution depends on your needs. Here are a few factors to consider:
Experience Level: If you’re new to Linux, it’s best to start with a beginner-friendly distro like
Ubuntu or Linux Mint. If you're more experienced or need a specialized environment, you
might consider Fedora, Debian, or Arch Linux.
Use Case: For general desktop use, Ubuntu or Mint are excellent choices. If you’re setting up
a server, you might want to go with CentOS or Debian. Developers often prefer Fedora or
Arch for its latest software.
System Resources: Some distros are lighter on resources than others. If you’re working with
older hardware, distros like Lubuntu or Xubuntu are designed to run efficiently on lower-spec
machines.
Conclusion
Linux distributions are designed to address a wide range of computing needs, offering solutions for
users at all skill levels and for various use cases, including personal desktops, servers, development
environments, and lightweight systems. With their open-source nature, robust security, and
extensive customization options, Linux distributions provide a reliable and efficient platform for
modern computing. The availability of diverse distributions ensures that users can select the one
best suited to their technical requirements and objectives.
Unix was created in the 1970s by Ken Thompson and Dennis Ritchie at Bell Labs. Dennis Ritchie was
also the creator of the C programming language. Originally a command-line operating system, Unix
has evolved to support graphical interfaces (GUI) as well. It became popular in universities,
enterprises, and internet servers due to its reliability and multitasking capabilities.
The goal behind Unix was to build an operating system that could communicate with different
machines and support networking, especially for servers. It helped solve a major problem how to
manage different devices with one OS.
While Unix was powerful, its closed-source nature was limiting. Linus Torvalds, a student at the
University of Helsinki. Frustrated with Unix’s restrictions, he decided to build his own kernel for his
final year project.
He combined C and Assembly to create a new kernel and called it Linux. Since Linux was open-
source, anyone could view, modify, and distribute it freely — something Unix never allowed. Linux is
also used for computer hardware and software, game development, mainframes, etc. It can run
various client programs. It can also offer high customization and flexibility.
Linux and Unix are both operating systems that are commonly used in enterprise and server
environments. While there are some similarities between them, there are also some key differences.
Linux Vs Unix
Linux and Unix are powerful multi-user operating systems, but differ in origin, licensing, architecture,
community support, usage scope, file systems, shells, hardware compatibility, and security
vulnerabilities.
Linux Unix
Linux was developed in the 1990s by Linus Torvalds as Unix was developed in the 1970s at
a free and open-source alternative to Unix. Bell Labs
Linux is Open Source, and a large number of Unix was developed by AT&T Labs,
programmers work together online and contribute to its different commercial vendors, and
development. non-profit organizations.
Linux kernal is Lightweight and modular Unix kernal is Monolithic and complex
Linux has a large and active community of developers While Unix also has a community, it is
and users who contribute to its development and generally smaller and more focused
provide support. on enterprise-level users.
File system supports - Ext2, Ext3, Ext4, Jfs, ReiserFS, Xfs, File system supports - jfs, gpfs, hfs,
Btrfs, FAT, FAT32, NTFS hfs+, ufs, xfs, zfs
Limitations of Unix
Limitations of Linux
As of 2025, Unix drives around 69.5% of mission-critical systems of legacy-heavy industries including:
Scientific Research & Academia: For its stability, deterministic behavior, and strong handling
of memory.
Note: Unix is expected to decline slowly, retained only where legacy compliance or hardware
restrictions exist.
IoT, embedded systems, and mobile devices (Android is built on Linux kernel).
Web hosting and DevOps pipelines (Linux dominates more than 90% of top 1 million web
servers, reports W3Techs).
Note: Linux will likely dominate all new deployments, especially with AI/ML, DevOps, Cloud, and
Edge Computing continuing to surge.
Conclusion
Unix and Linux have significantly influenced the world of computing, both having their own strength,
weaknesses, and intended application areas. Unix set the cornerstone of multi-user, multitasking
systems in the corporate and research setting, whereas Linux became an open-source, adaptable
alternative, granting developers and users freedom and adaptability.
While Unix still dominates legacy systems in finance, telecommunications, and scientific applications,
Linux has emerged as the pillar of contemporary computing — from cloud infrastructure and mobile
platforms to DevOps and enterprise server
Installing Ubuntu on VirtualBox is a great way to experience the powerful features of this popular
Linux distribution without altering your main operating system. Whether you’re a developer, a
student, or simply curious about Linux, setting up Ubuntu on VirtualBox allows you to test and
explore in a safe environment.
This guide will provide you with clear, step-by-step instructions on how to install Ubuntu on
VirtualBox, ensuring an efficient setup process. We'll cover all the necessary steps to install Ubuntu
on VirtualBox quickly and without any complications.
VirtualBox can execute a bit faster as it has the AMD & Intel Support.
Note: For the installation of VirtualBox on Windows , you can check out the article How to install
VirtualBox on Windows?
Table of Content
Step 1: Before we begin with the installation process, we need to Download ISO for Ubuntu. For
that, all the versions of Ubuntu are available on the Official Site.
Step 6: Select the type of Hard disk. Using VDI type is recommended.
Step 7: Either of the Physical Storage types can be selected. Using a Dynamically Allocated Disk is by
default recommended.
Step 8: Select Disk Size and provide the Destination Folder to install.
Step 9: After the Disk creation is done, boot the Virtual Machine and begin installing Ubuntu.
Step 10: If the installation disk is not automatically detected. Browse the file location and select
the ISO file for Ubuntu.
Step 11: Proceed with the installation file and wait for further options.
Step 12: Click on the Install Ubuntu option, this might look different for other Ubuntu versions.
Step 13: Select Keyboard Layout, if the defaults are compatible, just click on the Continue button
and proceed.
Step 14: Select Installation Type. By default, it is set to Normal Installation, which is recommended,
but it can also be changed to Minimal Installation if there is no need for all Ubuntu features.
Step 15: Click on the Install Now button and carry on with the installation. Do not get worried about
the Erase disk option, it will only be effective inside the virtual machine, and other system files
outside the VirtualBox remain intact.
Step 16: Click on the Continue button, and proceed with writing changes on the disk.
Step 17: Select your Location to set the Time Zone.
Step 18: Choose a Name for your computer and set a Password to secure login info.
Step 19: Wait for the installation process to complete.
Step 20: Once the installation process is over, reboot your Virtual Machine.
Step 21: Voila!! You're finished with the installation process. Now you can use Ubuntu along with
Windows, without creating a dual boot.
Steps to Make Full Screen of Ubuntu OS on VirtualBox
Note: After installing Ubuntu in Virtual Box, you may find that the Operating System is not suitable
for full-screen mode. If you try to make it large by clicking on maximize button, the visual part
remains the same and the outside becomes white/black.
Step 1: To overcome this and make Ubuntu fullscreen in Virtual Box, click on Devices then on Insert
Guest Additions CD Image.
Step 2: Now you will be able to see a Disk icon on the Taskbar, click on that and it will open the disk
Step 3: Write right-click inside the folder select Open in the Terminal, and run the following
commands. It will ask for the user's password, enter the password, and wait till completion.
./autorun.sh
Step 5: Now it will ask for the password and after checking the password a new tab will open inside
the terminal. Enter Yes there.
Step 6: After installation restart Ubuntu and now you can use Ubuntu in Full-Screen Mode.
So, these are some long steps needed to Download & Install Ubuntu on VirtualBox. You should go
through the entire steps for successfully Launching Ubuntu on VirtualBox in Full- Screen Mode. If
you miss any step or perform any error, the VirtualBox Installation of Ubuntu will not be successful.
Conclusion
By following this article, you can easily install Ubuntu on VirtualBox and begin exploring all that this
versatile operating system has to offer. VirtualBox provides a flexible and user-friendly platform for
running multiple operating systems simultaneously, making it ideal for testing and development
purposes. Regularly updating your Ubuntu VirtualBox installation and maintaining good
virtualization practices will ensure a stable and efficient experience. Enjoy the benefits of both
worlds by using Ubuntu on VirtualBox.
Linux Commands
Linux commands are essential for controlling and managing the system through the terminal. This
terminal is similar to the command prompt in Windows. It’s important to note that Linux/Unix
commands are case-sensitive. These commands are used for tasks like file handling, process
management, user administration, networking, and system monitoring. Here’s a list of A to Z Linux
commands, covering all operations that can be performed on the Linux terminal, including complete
Linux commands for file management, process control, networking, user administration, and system
monitoring:
Commands Description
Used to check whether the calling program has access to a specified file. It can
access
be used to check whether a file exists or not
Used to turn on or turn off the process for accounting or change info process
accton
accounting file
acpi Used to display the battery status and other ACPI information
addr2line Used to convert addresses into file names and line numbers
Instructs the shell to replace one string with another string while executing the
alias
commands
It helps the user when they don’t remember the exact command but knows a
apropos
few keywords related to the command that define its uses or functionality
Opens up a highly built-in interface to interact with the package manager of the
aptitude
machine
ar Used to create, modify and extract the files from the archives
It manipulates the System’s ARP cache. It also allows a complete dump of the
arp
ARP cache
atd It is a job scheduler daemon that runs jobs scheduled for later execution
Used to remove the specified jobs. To remove a job, its job number is passed in
atrm
the command
atq It displays the list of pending jobs which are scheduled by the user
Used for automatically generating Makefile.in files compliant with the set GNU
automake
Coding Standards
autoreconf Used to create automatically buildable source code for Unix-like systems
autoupdate Used to update configure.in file in our Linux system to a newer Autoconf.
awk It is a scripting language used for manipulating data and generating reports
banner Used to print the ASCII character string in large letter to standard output
It strips directory information and suffixes from file names i.e. it prints the file name
basename
NAME with any leading directory components removed
Used to read commands from standard input or a specified file and execute them
batch
when system load levels permit i.e. when the load average drops below 1.5
A mail notification system for unix that notifies the user at the command line when
biff
new mail arrives and tells from whom it is
break Used to terminate the execution of for loop, while loop and until loop
builtin Used to run a shell builtin, passing it arguments(args), and also to get the exit status
bzgrep Used to search for a pattern or an expression but inside a bzip2-compressed file
It does not have to read the entire input file before starting, so with a large file, it
bzless
starts up faster
Used as a filter for CRT viewing of bzip2 compressed files, which are saved with .bz2
bzmore
suffix
Used to see the calendar of a specific month or a whole year. By default, it shows
cal
current month's calendar as output
case It is the best alternative when we had to use multiple if/elif on a single variable
Reads data from file and gives their content as output. It helps us to create, view,
cat
concatenate files
It is a file system command which is used for changing the attributes of a file in a
chattr
directory
It allows you to change a user’s name and other details easily. chfn stands for
chfn
Change finger
chkconfig Used to list all available services and view or update their run level settings
chvt Used to switch between the different TTY (TeleTYpewriter) terminals available
Used to display a CRC(Cyclic Redundancy Check) value, the byte size of the file and
cksum
the name of the file to standard output
cmp Used to compare the two files byte by byte and helps you to find out whether the
two files are identical or not
It is used to filter out reverse line feeds. The col utility simply reads from the
col
standard input and writes to standard output
Used to format the text processor output so that it can be viewed on Cathode Ray
colcrt
Tube displays
Compares two sorted files line by line and write to standard output; the lines that
comm
are common and the lines that are unique
Used to reduce the file size. After compression, the file will be available with an
compress
added .Z extension
continue Used to skip the current iteration in for, while and until loop
cpio stands for “copy in, copy out“. It is used for processing the archive files like
cpio
*.cpio or *.tar. This command can copy files to and from archives
A list of commands that you want to run on a regular schedule, and also the name
crontab
of the command used to manage that list
csplit Used to split any file into many parts as required by the user
It allows quick access across the files (For example quickly seeing definition of a
ctags
function)
It is a type of scheduler for CUPS (Common Unit Printing System). It implements the
cupsd
printing system on the basis of the Internet Printing Protocol
curl A tool to transfer data to or from a server, using any of the supported protocols
For cutting out the sections from each line of files and writing the result to standard
cut
output
Used to store the history of a file. Whenever a file gets corrupted or anything goes
cvs
wrong “cvs” help us to go back to the previous version and restore our file
Used to display the system date and time. It is also used to set date and time of
date
the system
Used to declare shell variables and functions, set their attributes and display
declare
their values
Used to display information related to file systems about total space and
df
available space
diff Used to display the differences in the files by comparing the files line by line
Used to remove the trailing forward slahes “/” from the NAME and prints the
dirname
remaining portion
dmesg Used to examine the kernel ring buffer and print the message buffer of kernel
Used when the user wants to retrieve system’s hardware related information
dmidecode such as Processor, RAM(DIMMs), BIOS detail, etc. of Linux system in a readable
format
domainnam
Used to return the Network Information System (NIS) domain name of the host
e
dosfsck Diagnoses MS-DOS file system for problems and attempts to repair them
Used to track the files and directories which are consuming excessive amount of
du
space on hard disk drive
Used for launching the ed text editor which is a line-based text editor with a minimal
ed interface which makes it less complex for working on text files i.e creating, editing,
displaying and manipulating files
It treats the pattern as an extended regular expression and prints out the lines that
egrep
match the pattern
It allows ejecting a removable media (typically a CD-ROM, floppy disk, tape, or JAZ or
eject
ZIP disk) using the software
It is a editor having simple user interface. Also, there is no insert mode in this editor. It
emacs
only have editing mode.
Used to either print environment variables. It is also used to run a utility or command
env
in a custom environment
ex It is a text editor in Linux which is also termed as the line editor mode of the vi editor
Allows you to convert tabs into spaces in a file and when no file is specified it reads
expand
from standard input
This command or scripting language works with scripts that expect user inputs. It
expect
automates the task by providing inputs
It is bash shell BUILTINS commands, which means it is part of the shell. It marks an
export
environment variables to be exported to child-processes
Used to print the prime factors of the given numbers, either given from command
factor
line or read from standard input
Used to list, edit or re-execute the commands previously entered into an interactive
fc
shell
It scans the font directories and build font cache for applications which use fontconfig
fc-cache
for their font handling
It is used to list the available fonts and font styles. Using the format option, the list of
fc-list
all fonts can be filtered and sorted out
Format disk is a dialog-driven command in Linux used for creating and manipulating
fdisk
disk partition table
file Used to determine the type of a file. .file type may be of human-readable(e.g. ‘ASCII
text’) or MIME type(e.g. ‘text/plain; charset=us-ascii’)
find Used to find files and directories and perform subsequent operations on them
finger It is a user information lookup command which gives details of all the users logged in.
It wraps each line in an input file to fit a specified width and prints it to the standard
fold
output
for Used to repeatedly execute a set of command for every element present in the list
Displays the total amount of free space available along with the amount of memory
free
used and swap memory in the system, and also the buffers used by the kernel
functio
Used to create functions or methods
n
GNU Compiler Collections is used to compile mainly C and C++ language. It can also
gcc
be used to compile Objective C and Objective C++
GNU Debugger tool helps to debug the programs written in C, C++, Ada, Fortran,
gdb
etc.
getent Used to get the entries in a number of important text files called databases
gpasswd Used to administer the /etc/group and /etc/gshadow
Searches a file for a particular pattern of characters, and displays all lines that
grep
contain that pattern
Groups are the collection of users. Groups make it easy to manage users with the
groups
same security and access privileges
It verifies the integrity of the groups information. It checks that all entries in
grpck
/etc/group and /etc/gshadow have the proper format and contain valid data
Used to compress executable files and also used to automatically uncompress and
gzexe
execute the files
gzip This command compresses files. Each single file is compressed into a single file.
halt Used to instruct the hardware to stop all the CPU functions. Basically, it reboots
or stops the system.
Used to get statistics about the hard disk, alter writing intervals, acoustic
hdparm
management, and DMA settings
Used to filter and display the specified files, or standard input in a human
hexdump
readable specified format
Used to obtain the DNS(Domain Name System) name and set the system’s
hostname
hostname or NIS(Network Information System) domain name.
hostnamect Provides a proper API used to control Linux system hostname and change its
l related settings
It is a command line utility that allows the user to interactively monitor the
htop
system’s vital resources or server’s processes in real time
hwclock Utility for accessing the hardware clock, also called Real Time Clock (RTC)
iconv Used to convert some text in one encoding into another encoding
Used to find out user and group names and numeric ID’s (UID or group ID) of the
id
current user or any other user in the server
ifup It basically brings the network interface up, allowing it to transmit and receive data
Used for capturing a screenshot for any of the active pages we have and it gives
import
the output as an image file
Reads documentation in the info format. It will give detailed information for a
info
command when compared with the main page
iostat Used for monitoring system input/output statistics for devices and partitions
Used to display and monitor the disk IO usage details and even gets a table of
iotop
existing IO utilization by the process
ipcs Shows information on the inter-process communication facilities for which the
calling process has read access
Used to set up and maintain tables for the Netfilter firewall for IPv4, included in the
iptables
Linux kernel
iptables- It will save the current iptables rules in a user specified file, that can be used later
save when the user wants
Used to display the parameters, and the wireless statistics which are extracted
iwconfig
from /proc/net/wireless
It is a command line utility for joining lines of two files based on a key field present
join
in both the files
Used to terminate processes manually. kill command sends a signal to a process which
kill
terminates the process
Used to display the list of all the users logged in and out since the file /var/log/wtmp
last
was created
less Used to read contents of text file one page(one screen) per time
lsblk Used to display details about block devices and these block devices(Except ram disk) are
basically those files that represent devices connected to the pc.
Used to generate the detailed information of the system’s hardware configuration from
lshw
various files in the /proc directory
lsmo Used to display the status of modules in the Linux kernel. It results in a list of loaded
d modules
lsusb Used to display the information about USB buses and the devices connected to them
This command in Linux prints the mail queue i.e the list of messages that are there in
mailq
the mail queue
man Used to display the user manual of any command that we can run on the terminal
Allows the user to create directories. This command can create multiple directories at
mkdir
once
Used to view the text files in the command prompt, displaying one screen at a time in
more
case the file is large (For example log files)
mv Used to move one or more files or directories from one place to another in file
system like UNIX
nc(netcat) It is one of the powerful networking tool, security tool or network monitoring tool.
Used for controlling NetworkManager. nmcli command can also be used to display
nmcli network device status, create, edit, activate/deactivate, and delete network
connections
It is a network administration tool for querying the Domain Name System (DNS) to
nslookup
obtain domain name or IP address mapping or any other specific DNS record
o Used to convert the content of input in different formats with octal format as the default
d format
Used to join files horizontally (parallel merging) by outputting lines consisting of lines
paste
from each file specified, separated by tab as delimiter, to the standard output
pidof Used to find out the process IDs of a specific running program
ping Used to check the network connectivity between host and server/host
It is a user information lookup command which gives details of all the users logged
pinky
in. Unlike finger, in the pinky, you may trim the information of your interest.
Used to display the memory map of a process. A memory map indicates how
pmap
memory is spread out
powero
Sends an ACPI signal which instructs the system to power down
ff
Used to display the given string, number or any other format specifier on the
printf
terminal window
Used to list the currently running processes and their PIDs along with some other
ps
information depends on different options
pwd It prints the path of the working directory, starting from the root
read Reads up the total number of bytes from the specified file descriptor into the buffer
rename Used to rename the named files according to the regular expression perlexpr
Used to initialize the terminal. This is useful once a program dies leaving a terminal in
reset
an abnormal state
restore Used for restoring files from a backup created using dump
Used to remove objects such as files, directories, symbolic links and so on from the
rm
file system like UNIX
route Used when you want to work with the IP/kernel routing table
It is a software utility for Unix-Like systems that efficiently sync files and directories
rsync
between two hosts or machines
Used to monitor Linux system’s resources like CPU usage, Memory utilization, I/O
sar
devices consumption, etc.
Provides the ability to launch and use multiple shell sessions from a single ssh
screen
session
scriptrepla Used to replay a typescript/terminal_activity stored in the log file that was
y recorded by the script command
Used to compare two files and then writes the results to standard output in a
sdiff
side-by-side format
Used for finding, filtering, text substitution, replacement and text manipulations
sed
like insertion, deletion search etc.
select Used to create a numbered menu from which a user can select an option
prints to standard output either the scan codes or the key code or the `ascii’ code
showkey
of each key pressed
sleep Used to create a dummy job. A dummy job helps in delaying the execution
Used to read and execute the content of a file(generally set of commands), passed
source
as an argument in the current shell script
sudo Used as a prefix of some command that only superuser are allowed to run
sum Used to find checksum and count the blocks in a file
systemctl Used to examine and control the state of “systemd” system and service manager
Reads the standard input and writes it to both the standard output and one or
tee
more files
Used to execute a command and prints a summary of real-time, user CPU time and
time
system CPU time spent by executing a command when it terminates
tracepath Used to traces path to destination discovering MTU along this path
traceroute Prints the route that a packet takes to reach the host
Tree A recursive directory listing program that produces a depth-indented listing of files
It displays the information related to terminal. It basically prints the file name of
tty
the terminal connected to standard input
type Used to describe how its argument would be translated if used as commands
unexpand Converts each spaces into tabs writing the produced output to the standard output
uniq It is a command line utility that reports or filters out the repeated lines in a file
Used to execute a set of commands as long as the final command in the ‘until’
until
Commands has an exit status which is not zero
Uptime Used to find out how long the system is active (running)
usermod Used to change the properties of a user in Linux through the command line
It provides a set of commands to fetch username and its configurations from the
username
Linux host
users Used to show the user names of users currently logged in to the current host
vi It is the default editor that comes with the UNIX operating system is called visual editor.
Displays a message, or the contents of a file, or otherwise its standard input, on the
wall
terminals of all currently logged in users
Used to find out number of lines, word count, byte and characters count in the files
wc
specified in the file arguments
Used to download files from the server even when the user has not logged on to the
Wget
system and it can work in background without hindering the current process
Used to locate the executable file associated with the given command by searching it
which
in the path environment variable
while Used to repeatedly execute a set of command as long as the COMMAND returns true
whoam
Displays the username of the current user when this command is invoked
i
Allows a user to communicate with other users, by copying lines from one user’s
write
terminal to others
Used to build and execute commands from standard input. It converts input received
xargs
from standard input into arguments of a command
xdg-
Used to open a file or URL in the user’s preferred application
open
ye Used to print a continuous output stream of given STRING. If STRING is not mentioned
s then it prints ‘y’
zdiff Used to invoke the diff program on files compressed via gzip
Used to print the current time in the specified zone or you can say prints the current
zdump
time in each zonename named on the command line
zgrep Used to search out expressions from a given a file even if it is compressed
It is a compression and file packaging utility for Unix. Each file is stored in single .zip
zip
{.zip-filename} file with the extension .zip
Linux | Nmon
Implementation of ls | wc command
Important Linux Commands (leave, diff, cal, ncal, locate and ln)
mindepth and maxdepth in Linux find() command for limiting search to a specific directory
Unix commands are a set of commands that are used to interact with the Unix operating system.
Unix is a powerful, multi-user, multi-tasking operating system that was developed in the 1960s by
Bell Labs. Unix commands are entered at the command prompt in a terminal window, and they allow
users to perform a wide variety of tasks, such as managing files and directories, running processes,
managing user accounts, and configuring network settings. Unix is now one of the most commonly
used Operating systems used for various purposes such as Personal use, Servers, Smartphones, and
many more. It was developed in the 1970's at AT& T Labs by two famous personalities Dennis M.
Ritchie and Ken Thompson.
You'll be surprised to know that the most popular programming language C came into
existence to write the Unix Operating System.
The most important part of the Linux is Linux Kernel which was first released in the early 90s
by Linus Torvalds. There are several Linux distros available (most are open-source and free to
download and use) such as Ubuntu, Debian, Fedora, Kali, Mint, Gentoo, Arch and much
more.
Now coming to the Basic and most usable commands of Linux/Unix part. (Please note that all
the linux/unix commands are run in the terminal of a linux system.Terminal is like command
prompt as that of in Windows OS)
chown user:group
Changes the owner and group of a file or directory.
chown file.txt
cat Concatenates files and displays their contents. cat file1.txt file2.txt
kill Terminates processes using their process IDs (PIDs). kill <pid>
pkill Sends signals to processes based on name or other attributes. pkill -9 firefox
renice -n 10
Changes the priority of running processes.
renice <pid>
nice -n 10
Runs a command with modified scheduling priority.
nice command
jobs Lists active jobs and their status in the current shell session. jobs
Removes jobs from the shell's job table, allowing them to run
disown <job_id>
disown independently.
sed 's/old_string/new_string/g'
Processes and transforms text streams.
sed file.txt
network. username@hostname:/path/
du -sh
Displays disk usage of files and directories.
du /path/to/directory
Text
Editor Description Example
Vi (Vim) is a highly configurable, powerful, and Open a file with Vim: vim
feature-rich text editor based on the original Vi editor. filename
Vi / Vim offers modes for both command-line operations Exit Vim editor: Press Esc, then
Vim and text editing. type :wq and press Enter
Jed Jed is a lightweight yet powerful text editor that Open a file with Jed: jed
provides an intuitive interface and support for various filename
Text
Editor Description Example
Conclusion
In conclusion, Unix commands serve as a fundamental toolkit for navigating and managing the Unix
operating system, which has evolved from its inception in the 1960s to become one of the most
widely used OS platforms across various domains including personal computing, servers, and mobile
devices. From its origins at Bell Labs with developers Dennis M. Ritchie and Ken Thompson to the
birth of the C programming language and the subsequent emergence of Unix-like systems such as
Linux, the Unix ecosystem has significantly shaped the computing landscape. Understanding basic
Unix commands is essential for users to efficiently manipulate files, manage processes, configure
networks, and perform system administration tasks, thereby empowering them to leverage the full
potential of Unix-based systems for diverse computing needs.
The find command in Linux is used to search for files and directories based on name, type, size, date,
or other conditions. It scans the specified directory and its sub directories to locate files matching the
given criteria.
Using the find command is straightforward. To find a file in Linux, open a terminal.
Syntax:
For example :
To find a file named "example.txt" in the home directory, you would use:
These examples demonstrate how to use the find command to locate files and directories based on
different search criteria such as name, type, size, and modification time. This syntax allows you to
customize your file search by specifying the path, adding options, and defining search criteria using
expressions.
This query is designed to identify a file within a designated directory. In the provided example, it
seeks a file named "sample.txt" within the "GFG" directory.
The find command traverses the specified directory (./GFG) and looks for a file named "sample.txt."
If found, it displays the path to the file.
Output:
This command is use for discovering files within a directory that attach to a specific naming pattern.
In this case, it identifies files ending with '.txt' within the "GFG" directory.
The command looks for files with names ending in '.txt' within the "GFG" directory, presenting a list
of matching files.
Output:
3. How to find and Confirm File Deletion Using `find` Command in Linux
This command not only locates a specified file but also prompts the user for confirmation before
initiating its removal. The example seeks to delete a file named "sample.txt" within the "GFG"
directory.
The -exec option executes the rm command on the located file, and the -i flag prompts the user for
confirmation before deletion. When this command is entered, a prompt will come for confirmation, if
you want to delete sample.txt or not. if you enter 'Y/y' it will delete the file.
Output :
find
and delete a file with confirmation
4. Search for Empty Files and Directories Using `find` Command in Linux
This query is tailored for discovering and listing empty files and directories within a specified
directory.
The `find` command identifies and lists all empty folders and files within the "GFG" directory or its
subdirectories.
Output:
This command is used to locate files within a directory that have specific permissions. In the provided
example, it identifies files with permissions set to 664 within the "GFG" directory.
The command searches for files within the "GFG" directory with the specified permissions (664) and
displays the results.
Output:
This command is utilized to display the hierarchical structure of repositories and sub-repositories
within a given directory.
find . -type d
This command displays all the repositories and sub-repositories present in the current repository. In
the below example, we are currently in a repository namely "GeeksforGeeks" which contains a repo
"Linux", which contains sub-repo "LinuxCmds" which further contains a repo "FindCmd". The ouput
of below cmd is simply displaying this info. Please note that in this case if you will use "ls" cmd then it
will only show "/Linux".
Output:
This command is tailored for finding lines containing specific text within multiple files. The example
looks for lines containing the word 'Geek' within all '.txt' files in the current directory and its
subdirectories.
The command searches for '.txt' files (-type f and -name "*.txt") and uses grep to print lines
containing the specified text ('Geek').
Output:
8. Find Files by When They Were Modified Using `find` Command in Linux
The -mtime option is handy for finding files based on their modification time. To find files modified
within the last 7 days, you can use:
Find the files which is >100MB across the entire system. You can also change the file like 200M,
400M etc
In this it shows the files edited in the last day. You can also change 2 days (-2).
This command is used to find and delete temporary files in the /tmp directory.
In this we looks for config.yml only in the current directory and one subfolder deep or we can search
any file with search depth.
13. Use Grep to find Files Based on Content Using `find` Command in Linux
Combining the find command in linux with grep allows you to search for files based on their content.
For example, to find files containing the word "pattern" in the current directory and its
subdirectories, you can use:
This command will display the names of files containing the specified content.
-type f: Specifies that the search is for files only, excluding directories.
-exec grep -l "pattern" {} \;: Executes the grep command on each found file ({}) to search for
the specified content ("pattern"). The -l option in grep ensures that only the names of files
containing the pattern are displayed.
Command Execution:
1. The find linux command starts the search from the current directory, including all its
subdirectories.
2. For each file (-type f) found in the search, the -exec option executes the grep command.
3. The grep command searches for the specified content ("pattern") in each file.
4. If a file contains the specified content, its name is displayed due to the -l option in grep.
Here are the `find` command options along with brief descriptions of their purposes.
-name
Searches files by name (case-sensitive). find ~ -name "notes.txt"
"pattern"
-iname
Case-insensitive name search. find ~ -iname "notes.*"
"pattern"
-type f/d Finds only files (f) or directories (d). find /var/log -type f
Option What It Does Example
-size +10M Finds files larger than 10MB. find / -size +100M
-perm 644 Finds files with specific permissions. find ~ -perm 644
The find command performs real-time searches like they directly traversing the specified directory
structure in the filesystem. Unlike tools such as locate, which is depend on a prebuilt database that
may not reflect recent changes, find command in linux examines the files and directories as they
exist at the moment of search. This ensures that it can accurately locate even newly created or
modified files. Here is the working of search process:
Starting Point: The find command begins its search from the directory specified in the path
argument. It recursively explores all files and subdirectories.
Applying Criteria: The expressions define the search conditions. Each file or directory is
evaluated based on these criteria.
Taking Action: By default, find prints the paths of matching files. However, it can also execute
commands on the results using the -exec option.
A file system is a structured method of storing and managing data—including files, directories, and
metadata—on your machine. Think of it like a library. If thousands of books were scattered around,
finding one would be hard. But in an organized structure, like labeled shelves, locating a book
becomes easy.
This article aims to simplify the complexities of Linux file systems, guiding beginners through their
layers, characteristics, and implementations. By shedding light on these nuances, we empower users
to make informed choices in navigating the dynamic landscape of Linux operating systems.
Table of Content
A Linux file system is a set of processes that controls how, where, and when data is stored or
retrieved from storage devices. It manages data systematically on disk drives or partitions, and each
partition in Linux has its own file system because Linux treats everything as a file, including devices
and applications.. Like Windows uses C: and D: drives, Linux uses mount points, but everything
appears under the root / directory. In Linux, everything is treated as a file, including devices and
applications.
In this article, we will be focusing on the file system for hard disks on a Linux OSand discuss which
type of file system is suitable.
The Logical File System acts as the interface between the user applications and the file system itself.
It facilitates essential operations such as opening, reading, and closing files. Essentially, it serves as
the user-friendly front-end, ensuring that applications can interact with the file system in a way that
aligns with user expectations.
The Virtual File System (VFS) is a crucial layer that enables the concurrent operation of multiple
instances of physical file systems. It provides a standardized interface, allowing different file systems
to coexist and operate simultaneously. This layer abstracts the underlying complexities, ensuring
compatibility and cohesion between various file system implementations.
The Physical File System is responsible for the tangible management and storage of physical memory
blocks on the disk. It handles the low-level details of storing and retrieving data, interacting directly
with the hardware components. This layer ensures the efficient allocation and utilization of physical
storage resources, contributing to the overall performance and reliability of the file system.
Together, these layers form a cohesive architecture, orchestrating the organized and efficient
handling of data in the Linux operating system.
A file system defines the rules and structures for how data is organized, stored, accessed, and
managed on a storage device.
Space Management: How the data is stored on a storage device. Pertaining to the memory
blocks and fragmentation practices applied in it.
Filename: A file system may have certain restrictions to file names such as the name length,
the use of special characters, and case sensitive-ness.
Directory: The directories/folders may store files in a linear or hierarchical manner while
maintaining an index table of all the files contained in that directory or subdirectory.
Metadata: For each file stored, the file system stores various information about that file's
existence such as its data length, its access permissions, device type, modified date-time,
and other attributes. This is called metadata.
Utilities: File systems provide features for initializing, deleting, renaming, moving, copying,
backup, recovery, and control access of files and folders.
Design: Due to their implementations, file systems have limitations on the amount of data
they can store.
Understanding these key terms is essential before exploring various Linux file system
implementations for disk storage.
1) Journaling:
Journaling file systems keep a log called the journal, that keeps track of the changes made to a file
but not yet permanently committed to the disk so that in case of a system failure the lost changes
can be brought back. Journaling works like a checklist:
Journaling can be configured in three different modes, each offering a trade-off between reliability
and performance. The Journal mode is the most reliable as it logs both file data and metadata,
ensuring the highest level of data integrity. However, it is also the slowest mode due to the extensive
logging process. The Ordered mode, on the other hand, logs only the metadata, with the file data
being written before the metadata. This provides a balanced approach between data safety and
system performance. Lastly, the Writeback mode logs only metadata without enforcing any order
between file data and metadata writes. While it is the fastest journaling mode, it is also the least
safe, as it increases the risk of data corruption in the event of a crash.
2) Versioning:
Versioning file systems store previously saved versions of a file, i.e., the copies of a file are stored
based on previous commits to the disk in a minutely or hourly manner to create a backup.
3) Inode:
The index node is the representation of any file or directory based on the parameters - size,
permission, ownership, and location of the file and directory.
Now, we come to part where we discuss the various implementations of the file system in Linux for
disk storage devices.
Note: Cluster and distributed file systems will not be included for simplicity.
Types of File System in Linux
Implemented in 1992, it is the first file system specifically designed for Linux. It is the first member of
the ext family of file systems.
2) ext2:
The second ext was developed in 1993. It is a non-journaling file system that became known for
its efficient handling of flash drives and SSDs. It solved the problems of separate timestamp for
access, inode modification and data modification. Due to not being journaled, it is slow to load at
boot time.
3) Xiafs:
Also developed in 1993, Xiafs was developed as an alternative but lacked the power and
functionality of ext2. Due to limited features and scalability, it is no longer in use.
4) ext3:
Introduced in 1999, ext3 brought in journaling capabilities, offering improved reliability. Unlike ext2,
it avoided long boot-time checks after an improper shutdown. It also supported online file system
growth and HTree indexing, making it efficient for large directories.
First created by IBM in 1990, the original JFS was taken to open source to be implemented for Linux
in 199 it is Known for its ability to perform well under varied loads JFS performs well under different
kinds of load but is not commonly used anymore due to the release of ext4 in 2006 which gives
better performance.
6) ReiserFS:
It is a journal file system developed in 2001. Despite its earlier issues, it has tail packing as a scheme
to reduce internal fragmentation. It uses a B+ Tree that gives less than linear time in directory
lookups and updates. It was the default file system in SUSE Linux till version 6.4, until switching to
ext3 in 2006 for version 10.2.
7) XFS:
XFS is a 64-bit journaling file system and was ported to Linux in 2001. It now acts as the default file
system for many Linux distributions. It provides features like snapshots, online defragmentation,
sparse files, variable block sizes, and excellent capacity. It also excels at parallel I/O operations.
8) SquashFS:
Developed in 2002, this file system is read-only and is used only with embedded systems where low
overhead is needed.
9) Reiser4:
It is an incremental model to ReiserFS. It was developed in 2004. However, it is not widely adapted or
supported on many Linux distributions.
10) ext4:
The fourth ext developed in 2006, is a journaling file system. It has backward compatibility with ext3
and ext2 and it provides several other features, some of which are persistent pre-allocation,
unlimited number of subdirectories, metadata checksumming and large file size. ext4 is the default
file system for many Linux distributions and also has compatibility with Windows and Macintosh.
It was developed in 2007. It provides many features such as snapshotting, drive pooling, data
scrubbing, self-healing and online defragmentation. It is the default file system for Fedora
Workstation.
12) bcachefs:
This is a copy-on-write file system that was first announced in 2015 with the goal of performing
better than btrfs and ext4. Its features include full filesystem encryption, native compression,
snapshots, and 64-bit check summing.
13) Others:
Linux also has support for file systems of operating systems such as NTFS and exFAT, but these do not
support standard Unix permission settings. They are mostly used for interoperability with other
operating systems.
Please note that there are more criteria than the ones listed in the table. This table is supposed to
give you an idea of how file systems have evolved.
File Systems
Max.
4032
filena
me 255
length 255 255 248 255 255 char 255 3976 255 255
acter
(bytes
s
)
Allow
able
charac
ters Any
exce exce Unic exce exce exce
in exce exce ode exce
pt pt pt pt except pt
direct pt pt pt
NUL, NUL exce NUL NUL, NUL, / NUL,
ory NUL NUL NUL
/ or / pt or / / /
entrie
s NUL
(Any
byte)
Max.
pathn Unde Unde Unde Unde Unde Unde Unde Unde Undefi Unde
ame fined fined fined fined fined fined fined fined ned fined
length
Max. 8TB
16GB 64M 16GB 16GB -
file 2 GB 4PB 8TB 8EB (on 16EB
- 2TB B - 2TB 16TB
size x86)
Max.
2TB - 2TB -
volum 2 GB 2GB 32PB 16TB 8EB - 1EB 16EB
32TB 32TB
e size
no. of
files
Metad
ata
only No No No Yes Yes Yes Yes No Yes No
journ
aling
Compr
No No No No No No No Yes No Yes
ession
Block
sub-
No No No No Yes Yes No Yes No Yes
alloca
tion
Online
No No - Yes No Yes Yes Yes Yes Yes
grow
Yes
Encryp (experi
No No No No No No No Yes No
tion mental
)
Check Parti
No No No No No No No Partial Yes
sum al
Observations:
We see that XFS, ext4 and btrfs perform the best of all the other file systems. In fact, btrfs looks as if
it's almost the best. Despite that, the ext family of file systems has been the default for most Linux
distributions for a long time. So, what is it that made the developers choose ext4 as the default
rather than btrfs or XFS? Since ext4 is so important for this discussion, let's describe it a bit more.
ext4 in Linux File System
Ext4 was designed to be backward compatible with ext3 and ext2, its previous generations. It's better
than the previous generations in the following ways:
Utilizes extents that improve large file performance and reduces fragmentation.
Performs journal checksumming which allows the file system to realize that some of its
entries are invalid or out of order after a crash.
Transparent encryption.
Allows cleaning of inode tables in background which in turn speeds initialization. The process
is called lazy initialization.
Enables writing barriers by default. Which ensures that file system metadata is correctly
written and ordered on disk, even when write caches lose power.
There are still some features in the process of developing like metadata checksumming, first-class
quota supports, and large allocation blocks.
However, ext4 has some limitations. Ext4 does not guarantee the integrity of your data, if the data is
corrupted while already on disk then it has no way of detecting or repairing such corruption. The
ext4 file system cannot secure deletion of files, which is supposed to cause overwriting of files upon
deletion. It results in sensitive data ending up in the file-system journal.
XFS performs highly well for large filesystems and high degrees of concurrency. So XFS is stable, yet
there's not a solid borderline that would make you choose it over ext4 since both work about the
same. Unless you want a file system that directly solves a problem of ext4 like having capacity >
50TiB.
Btrfs on the other hand, despite offering features like multiple device management, per-block
checksumming, asynchronous replication and inline compression, does not perform the best in many
common use cases as compared to ext4 and XFS. Several of its features can be buggy and result in
reduced performance and data loss.
For example, if our use_case is to set up a server that will first store and serve large multimedia files
(videos and audios). In that case we have to prioritize efficient speed and use of storage space.
According to this requirement the XFS file system would be a better choice. Because we know that
XFS is optimized for large files and can work on high volumes of data transfer which in general makes
it ideal for media servers.
Following steps to use it:
Installing xfsprogs
We have formatted partition using XFS filesystem. (Used -f for forcefully to avoid error or warning) .
We have mounted XFS partition to a directory `/mnt/jayesh_xfs_partition`, (you can create your own
directory.)
df -h
Successful mount
Conclusion:
In this article we discussed Linux file system in operating systems, delving into its layers,
characteristics, and the architecture of Linux file systems. It provides a thorough exploration of
various options, from ext to contemporary choices like ext4, XFS, and btrfs. The comparison table
highlights the superior performance of XFS, ext4, and btrfs, with ext4 standing out for its backward
compatibility and design enhancements. The article wisely recommends ext4 as the default for
general users unless specific needs dictate alternatives, citing instances where XFS excels for large
media files. In essence, the article serves as a practical guide for users to navigate the complexities of
file systems, emphasizing the reliable nature of ext4 for most use cases while acknowledging niche
applications for other systems.
The Linux File Hierarchy Structure or the Filesystem Hierarchy Standard (FHS) defines the directory
structure and directory contents in Unix-like operating systems. It is maintained by the Linux
Foundation.
In the FHS, all files and directories appear under the root directory /, even if they are stored
on different physical or virtual devices.
Some of these directories only exist on a particular system if certain subsystems, such as the
X Window System, are installed.
Most of these directories exist in all UNIX operating systems and are generally used in much
the same way; however, the descriptions here are those used specifically for the FHS and are
not considered authoritative for platforms other than Linux.
linux-directory
1. / (Root):
At the top of every Linux file system is the root directory represented by a forward slash /. It’s the
base point, and no directory exists above it. If you look at the file system graphically, you’ll see all
other directories branching from this root directory.
Every single file and directory start from the root directory.
The only root user has the right to write under this directory.
/root is the root user’s home directory, which is not the same as /
Only the root user has permission to modify contents inside this directory. Regular users cannot
make changes here. For example, if you attempt to create a file in / as a non-root user, you’ll
encounter a "Permission Denied" error.
root-linux-directory
2. /bin :
The /bin directory contains essential commands and binaries needed by all users,
including cp, ls, ssh, and kill. These commands are universally available across user types.
Common linux commands you need to use in single-user modes are located under this
directory.
Commands used by all the users of the system are located here e.g. ps, ls, ping, grep, cp
bin-linux-directory
3. /boot :
This directory stores all files required for booting the system. It includes the GRUB bootloader
configuration and essential kernel files that are loaded during startup.
4. /dev :
Device files in Linux are stored in the /dev directory. These are special files that act as interfaces
between hardware and software. Device files are of two types: block devices (e.g., hard drives)
and character devices (e.g., microphones and speakers). Examples include /dev/sda1 for disk
partitions.
These include terminal devices, usb, or any device attached to the system.
5. /etc :
Short for "Editable Text Configuration," /etc contains configuration files for system applications,
users, services, and tools or it contains the Host-specific system-wide configuration files. For
example, user details like UID and local addresses are defined here.
This also contains startup and shutdown shell scripts used to start/stop individual programs.
6. /home :
Every non-root user has a personal directory inside /home. For example, if your username is anshu,
your personal directory would be /home/anshu. Each user can create, delete, or modify files only in
their own home directory and cannot access others’ home directories.
Home directories for all users to store their personal files, containing saved files, personal
settings, etc..
home-linux-directory
7. /lib:
Applications require shared libraries to run, which are stored in /lib. These include dynamic libraries
needed during runtime. For example, Apache server libraries are available here.
Devices like USBs, CDs, and pen drives are mounted under /media. For example, when a CD-ROM is
inserted (appeared in FHS-2.3), its details will appear here.
When external drives are connected, they are temporarily mounted in /mnt. This is where their
contents become accessible to the system.
10. /opt :
Third-party software and packages not part of the default system installation are stored in /opt. It
includes their configuration and data files.
This directory holds administrative binaries like iptables, firewall management tools, fsck, init, route
etc. These binaries are primarily for system administrators and typically require root privileges to
execute.
The linux commands located under this directory are used typically by system administrators,
for system maintenance purposes.
Site-specific data served by this system, such as data and scripts for web servers, data offered by FTP
servers, and repositories for version control systems.
Programs create temporary files during execution, and these are stored in /tmp. These files are
deleted automatically after the program finishes or when the system is restarted.
Files under this directory are deleted when the system is rebooted.
tmp-linux-directory
14. /usr :
Secondary hierarchy for read-only user data; contains the majority of (multi-)user utilities and
applications.
Contains binaries, libraries, documentation, and source-code for second level programs.
/usr/bin contains binary files for user programs. If you can’t find a user binary under /bin,
look under /usr/bin. For example: at, awk, cc, less, scp
/usr/sbin contains binary files for system administrators. If you can’t find a system binary
under /sbin, look under /usr/sbin. For example: atd, cron, sshd, useradd, userdel
/usr/local contains user's programs that you install from source. For example, when you
install apache from source, it goes under /usr/local/apache2
15. /proc:
The /proc directory provides detailed information about system processes. Each process is assigned a
unique ID and represented as a directory inside /proc. For example, /proc/meminfo gives real-time
data about memory usage including total, free, buffer, and cache statistics.
This is a pseudo filesystem that contains information about running processes. For
example: /proc/{pid} directory contains information about the process with that particular
pid.
This is a virtual filesystem with text information about system resources. For example:
/proc/uptime
proc-linux-directory