Notes on Linux
1. Introduction
Linux is a free and open-source operating system based on Unix,
created by Linus Torvalds in 1991.
It is the backbone of servers, supercomputers, embedded
systems, and Android OS.
Linux follows a multi-user, multitasking, and multi-threaded
architecture.
Known for security, stability, and flexibility.
2. Features of Linux
Open-source → Free to use, modify, and distribute.
Multi-user system → Multiple users can work simultaneously.
Multitasking → Runs several tasks at once.
Portability → Works on desktops, servers, mobile devices, embedded
systems.
Security → Based on user permissions, encryption, and firewalls.
Shell and Command-line interface for powerful control.
File system hierarchy for data management.
Customizable → Multiple distributions (Ubuntu, Fedora, Debian,
CentOS, Red Hat).
3. Linux Architecture
1. Kernel → Core part, interacts with hardware (CPU, memory, devices).
2. System Libraries → Provide functions for applications to interact with
the kernel.
3. System Utilities → Manage tasks like file handling, process
management.
4. Shell → Command interpreter between user and system.
5. Applications → User-level programs (browsers, editors, etc.).
4. Linux File System
Organized in a hierarchical tree structure starting from / (root).
Important directories:
o /home → User files.
o /bin → Basic commands (ls, cp, mv).
o /etc → Configuration files.
o /var → Logs, temporary files.
o /usr → User programs and libraries.
o /root → Root user’s home directory.
5. Basic Linux Commands
File operations:
o ls → List files
o cd → Change directory
o pwd → Print working directory
o cp → Copy files
o mv → Move/Rename files
o rm → Remove files
File viewing:
o cat, more, less, head, tail
User management:
o whoami, id, adduser, passwd
Process management:
o ps, top, kill, jobs, bg, fg
Permissions:
o chmod, chown, umask
System info:
o uname -a, df -h, free -m, uptime
6. User Management & Permissions
Users: Root (superuser) and normal users.
Groups: Users can be grouped for permission control.
Permissions: Read (r), Write (w), Execute (x).
o Example: chmod 755 file.sh → Gives owner full rights, others
read & execute.
7. Linux Shell
Shell is the command-line interpreter.
Common shells: Bash, Zsh, Ksh, Fish.
Used for executing commands, running scripts, and automation.
8. Package Management
Software installation handled by package managers.
Debian-based (Ubuntu, Debian): apt-get, dpkg
Red Hat-based (Fedora, CentOS): yum, dnf, rpm
9. Processes in Linux
Process → A running program instance.
Types: Foreground, Background, Daemon.
Commands:
o ps → Show running processes
o kill <PID> → Terminate process
o top → Display active processes
10. Linux Networking
Common networking commands:
o ifconfig or ip addr → View IP addresses
o ping → Test connectivity
o netstat → View connections
o scp → Secure copy files
o ssh → Remote login
o wget / curl → Download files
11. Advantages of Linux
Free and open-source.
High security and stability.
Runs on old as well as modern hardware.
Strong community support.
Widely used in servers and cloud platforms.
12. Disadvantages of Linux
Not all commercial software supports Linux.
Gaming support is limited (though improving with Steam/Proton).
Requires more technical knowledge compared to Windows.
13. Applications of Linux
Servers & Cloud (Apache, Nginx, AWS, Google Cloud).
Networking & Security (Firewalls, Pen-testing, Ethical Hacking).
Embedded Systems (IoT devices, routers).
Mobile OS (Android is Linux-based).
Programming & Development (preferred environment for
developers).
✅ Summary:
Linux is a powerful, secure, and open-source operating system widely
used in servers, cloud computing, networking, embedded systems, and
mobile devices. Its flexibility, stability, and community support make it
one of the most reliable operating systems in the world.