Table of contents
History of Linuxπ§
π§ Linux is a free and open-source software operating system from the Unix family.
π¨βπ» It was developed by Linus Torvalds, a student at the University of Helsinki, in September 1991.
π© He posted the first code of Linux 0.01 on the Minix newsgroup on September 17, 1991.
π» Due to its popularity, he continued to develop new code and released the first official version of Linux, version 0.02 on October 5, 1991.
π Today, Linux is one of the most popular operating systems.
πͺ 90% of the fastest supercomputers run on Linux variants, including the top 10.
Basic Concept of Linux Programming
π§ Linux is an open-source operating system kernel that is highly adaptable
π» Widely used for server-side applications and powers significant digital infrastructures
π Has evolved into a culture and ecosystem of its own.
π‘ Linux programming requires knowledge of C programming language and an understanding of its potential uses.
π’π§ Linux Architecture: Building Blocks of the OS! π§±
π² Application π²- Applications in the Linux architecture are software programs that run on top of the operating system and interact with its components.
π Shell π- The shell is like the command center of our building. It provides a command-line interface where you can interact with the system using text commands.
βοΈ Kernel βοΈ- The kernel is the core of our building, providing essential services and managing resources. It acts as a bridge between the hardware and software layers, ensuring smooth communication and coordination.
π₯οΈ Hardware π₯οΈ-The hardware represents the physical infrastructure of our building. It includes your computer's components like the processor, memory, hard drive, graphics card, and other peripherals.
π§πLinux File System Hierarchy
In Linux everything is represented as a file including a hardware program, the files are stored in a directory, and every directory contains a file with a tree structureπ³. That is called File System Hierarchy.
πLinux uses a single-rooted, inverted tree-like structure.
Root Directory represents with / (forward slash) It is a top-level directory in Linux.
π The file system hierarchy starts from the root directory ("/"), which is the primary hierarchy root and the root directory of the entire system.
πOnly the root user has write access to the root directory.
π The root directory is not the same as the user's home directory ("/home").
π¦ Essential command binaries are located in the "/bin" directory.
π§ Common Linux commands used in single-user mode are found in "/bin". π
The "/boot" directory contains boot loader files like kernels and initrd.
π₯οΈ Essential device files are stored in the "/dev" directory.
π System-wide configuration files are located in the "/etc" directory.
π Users' home directories are stored in "/home".
π Libraries essential for binaries in "/bin" and "/sbin" are found in the "/lib" directory.
πΏ Mount points for removable media are located in the "/media" directory.
Linuxπ§ Basic π¨βπ» Commands
π Navigating the File System π
ls
: List files and directories in the current location.ls [options] [directory]
cd
: Change the directory to navigate through different folders.cd [directory]
pwd
: Print the current working directory.pwd
π Working with Files and Directories π
mkdir
: Create a new directory.mkdir [directory]
touch
: Create a new empty file.touch [filename]
cp
: Copy files and directories.cp [options] [source] [destination]
mv
: Move or rename files and directories.mv [options] [source] [destination]
rm
: Remove files and directories.rm [options] [file/directory]
π File and Text Manipulation π
cat
: Display the content of a file.cat [filename]
head
: Display the first few lines of a file.Syntax: head [OPTIONS] [FILE]
EXAMPLE:
head -n 10 myfile.txt
In the example above,
-n 10
specifies that you want to display the first 10 lines of the file.tail
: Display the last few lines of a file.tail [options] [file]
EXAMPLE:
tail -n 10 file.txt
In the example above, displays the last 10 lines of the file "file.txt"
π§ System Administration π§
sudo
: Execute a command with administrative privileges.sudo [command]
apt-get
(for Debian-based distros) ordnf
(for Fedora-based distros): Package management commands for installing, updating, and removing software.sudo apt update
: Used to update the package index files to get the latest list of available packages in the repositories.sudo apt update
sudo apt upgrade
: Used to install available upgrades of all packages currently installed on the system from the sources configured via sources.sudo apt upgrade
π User and Permission Management:
whoami
: Print the current username.whoami
passwd
: Change the password for the current user.passwd
useradd
: Add a new user.useradd [options] username
What is the Linux command to check your present working directory?
pwd
What is the Linux command to List all the files or directories including hidden files?
ls -a
What is the Linux command to create a nested directory A/B/C/D/E?
mkdir -p A/B/C/D/E
π¨βπ»Benefits of Linux π§
π Cost-effective: Linux is free and open-source, saving you money on licensing fees.
π Secure: Linux has a robust security framework, making it less vulnerable to viruses and malware.
πͺ Customizable: Linux allows users to personalize their operating system according to their preferences and needs.
π Performance: Linux is known for its efficiency and performance, making it ideal for resource-intensive tasks.
π Compatibility: Linux supports a wide range of hardware architectures and has extensive software compatibility.
π Stability: Linux is renowned for its stability and reliability, offering long uptimes and minimal crashes.
π₯ Community Support: Linux has a vibrant community of users and developers who provide support, guidance, and regular updates.
π Open-source Software: Linux provides access to a vast repository of free and open-source software, fostering innovation and collaboration.
π Scalability: Linux scales seamlessly from small devices to large servers, making it suitable for diverse environments.
π» Versatility: Linux offers a range of distributions and desktop environments, catering to various user preferences and requirements.
Embrace the power of Linux and unlock a world of flexibility, security, and customization! π§β¨π
π Conclusion:
Congratulations! π You've taken your first steps into the fascinating world of Linux. We hope this blog has given you a taste of what Linux is all about. Remember, Linux is a vast and versatile operating system, with endless possibilities waiting for you to explore! π Embrace the penguin power and have fun with your Linux journey! π§πͺ
π Did you find this blog helpful? Let us know in the comments below! π And if you have any questions or need further assistance, we're here to help! π€
Happy Linux-ing! π»β¨