Skip to the content.

Linux

What is Linux?

Just like Windows, iOS, and Mac OS, Linux is an operating system. In fact, one of the most popular platforms on the planet, Android, is powered by the Linux operating system. An operating system is software that manages all of the hardware resources associated with your desktop or laptop.

Description of Linux

The Linux operating system comprises several different pieces:

1.Bootloader – The software that manages the boot process of your computer. For most users, this will simply be a splash screen that pops up and eventually goes away to boot into the operating system.
2.Kernel – This is the one piece of the whole that is actually called ?Linux?. The kernel is the core of the system and manages the CPU, memory, and peripheral devices. The kernel is the lowest level of the OS.
3.Init system – This is a sub-system that bootstraps the user space and is charged with controlling daemons. One of the most widely used init systems is systemd? which also happens to be one of the most controversial. It is the init system that manages the boot process, once the initial booting is handed over from the bootloader (i.e., GRUB or GRand Unified Bootloader).
4.Daemons – These are background services (printing, sound, scheduling, etc.) that either start up during boot or after you log into the desktop.
5.Graphical server – This is the sub-system that displays the graphics on your monitor. It is commonly referred to as the X server or just X.
6.Desktop environment – This is the piece that the users actually interact with. There are many desktop environments to choose from (GNOME, Cinnamon, Mate, Pantheon, Enlightenment, KDE, Xfce, etc.). Each desktop environment includes built-in applications (such as file managers, configuration tools, web browsers, and games).
7.Applications – Desktop environments do not offer the full array of apps. Just like Windows and macOS, Linux offers thousands upon thousands of high-quality software titles that can be easily found and installed. Most modern Linux distributions (more on this below) include App Store-like tools that centralize and simplify application installation. For example, Ubuntu Linux has the Ubuntu Software Center (a rebrand of GNOME Software? Figure 1) which allows you to quickly search among the thousands of apps and install them from one centralized location.

Why use Linux?

This is the one question that most people ask. Why bother learning a completely different computing environment, when the operating system that ships with most desktops, laptops, and servers works just fine?

To answer that question, I would pose another question. Does that operating system you?re currently using really work ?just fine?? Or, do you find yourself battling obstacles like viruses, malware, slow downs, crashes, costly repairs, and licensing fees? If you struggle with the above, Linux might be the perfect platform for you. Linux has evolved into one of the most reliable computer ecosystems on the planet. Combine that reliability with zero cost of entry and you have the perfect solution for a desktop platform.

That’s right, zero cost of entry… as in free. You can install Linux on as many computers as you like without paying a cent for software or server licensing.

Linux is also an open source license. Open source follows these key tenants:

The freedom to run the program, for any purpose. The freedom to study how the program works, and change it to make it do what you wish. The freedom to redistribute copies so you can help your neighbor. The freedom to distribute copies of your modified versions to others. These points are crucial to understanding the community that works together to create the Linux platform. Without a doubt, Linux is an operating system that is ?by the people, for the people?. These tenants are also a main factor in why many people choose Linux. It?s about freedom and freedom of use and freedom of choice.

Linux Distributions

Linux has a number of different versions to suit any type of user. From new users to hard-core users, you’ll find a “flavor” of Linux to match your needs. These versions are called distributions (or, in the short form, “distros”). Nearly every distribution of Linux can be downloaded for free, burned onto disk (or USB thumb drive), and installed (on as many machines as you like).

Popular Linux distributions include:
LINUX MINT
MANJARO
DEBIAN
UBUNTU
ANTERGOS
SOLUS
FEDORA
ELEMENTARY OS
OPENSUSE

Linux file system overview

Linux has hierarchical tree structue means it has only one root folder whereas windows has multiple root folders.

/root —-> Root users home directory is at /root
/home —-> For normal users
/bin —-> Excecutables or most essential user commands
/sbin —-> System relevant commands used by super user
/lib —-> Essential shared libraries that executables from /bin or /sbin use
/user —-> This is used for user home directories(because of storage limitations it was split into to root binary folders and user binary folders)
/user/local —-> Programs that you install on the computer and third party applications like docker,minicube,java etc
/opt —-> Third party programs you install
/boot —-> Contains files requored for booting
/etc —-> Place where configurations for system wide applications is stored
/dev —-> Location of device files like webcam keyboard, hard drive etc
/var —-> Contains files to which the system writes data during the course of its operation
/var/log —-> Contains log files
/var/cache —-> Contains cached data from application programs
/tmp —-> Temporary resources required for some process, kept here temporarily
/media —-> Contains subdirecories where removable media device inserted into the computer are mounted
/mnt —-> Historically system admins mounted temporary file systems there

Use Command Line Interface (CLI) Over Graphical User Interface (GUI)

why using CLI instead GUI
1.work more efficient
2.Easier for bulk operations
3.CLI is more powerful
4.Virtual tasks like video editing

Linux Accounts and Groups

Basically there are three user categories

1.Super user account

2.Regular/standard user account

3.Service account

Basic Linux Commands

The commands which we use in our command prompt
sudo —-> sudo stands for “SuperUser Do”. So, if you want any command to be done with administrative or root privileges, you can use the sudo command
pwd —-> shows the present directory
ls —-> shows the list of files and directories
ls -a —-> shows the list of files and directories including hidden files and directories
cd —-> use the command to go to a directory
mkdir —-> to make directory
rmdir —-> to remove directory
rm -r —-> for recursive remove
touch —-> to create a file
cp —-> to copy files
mv —-> to move files
locate —-> command is used to locate a file in a Linux system, just like the search command in Windows
echo —-> echo command helps us move some data, usually text into a file
cat —-> use the command to display the contents of a file
chmod —-> use chmod to make a file executable and to change the permissions granted
hostname —-> use hostname to know your name in your host or network
hostname -I —-> this command gives you your IP address in your network
ping —-> use ping to check your connection to a server

Tips and Tricks for Using Linux Command Line

–> You can use the clear command to clear the terminal if it gets filled up with too many commands.
–> TAB can be used to fill up in terminal. For example, You just need to type “cd Doc” and then TAB and the terminal fills the rest up and makes it “cd Documents”.
–> Ctrl+C can be used to stop any command in terminal safely. If it doesn’t stop with that, then Ctrl+Z can be used to force stop it.
–> You can exit from the terminal by using the exit command.
–> You can power off or reboot the computer by using the command sudo halt and sudo reboot.