• Post author:
  • Reading time:37 mins read
You are currently viewing Learn Linux Easily: A Comprehensive Guide for Beginners and Intermediates PART-1


Are you interested in learning Linux but don’t know where to start? 🤔 

If so, you’re not alone! Many people find the world of Linux to be exciting but intimidating. But don’t worry, I am here to help you get started. It’s understandable how overwhelming it can feel to dive into a new operating system. That’s why I’ve created a comprehensive guide for beginners and intermediates to learn Linux and master the tech easily.

With this article, I will guide you through the essentials of Linux, starting from the basics of the command line, all the way to configuring and installing software. With step-by-step instructions and clear explanations, this guide is designed to help you improve your Linux skills and reach the next level.

Regardless of whether you’re a complete beginner or have some experience with Linux, you’ll find value in this guide. So, let’s begin our journey towards mastering Linux together! ✌️


A brief History of Linux 🐧

Let’s take a trip down memory lane to the early 1990s, a time when proprietary software was the norm. It was during this time that Linus Torvalds, a student at the University of Helsinki, developed a new operating system for his personal project. This was the birth of Linux.

Linus took inspiration from UNIX, but he didn’t clone it completely. Instead, he studied a similar operating system called MINIX, developed by Andrew Tanenbaum for teaching his students. Linus used this as a base to develop his own kernel, which he named Linux. He decided to keep the kernel free, which was a significant departure from the proprietary software model of the time.

Around the same time, there was a growing movement advocating for free software. GNU was one such movement, which aimed to create free software for everyone to use. The movement gained momentum between 1991 and 1995, which coincided with the development of Linux.

Linux and the free software movement have come a long way since then. Today, Linux is one of the most widely used operating systems in the world, powering everything from smartphones to supercomputers. And the principles of free software and open-source development have transformed the technology industry, making it more accessible and collaborative than ever before.

 Linux (Kernel)  +  GNU (Software)  =  O.S. (Operating System)      

Linux is known for its flexibility and diversity, and one of the ways this is reflected is through the numerous distributions, or “distros“, available. Each distro offers its unique combination of features, packages, and user interface. Popular distro include

  • Ubuntu, known for its ease of use and popularity among beginners.
  • Debian is stable, secure, and often used as the base for other distros.
  • Fedora is focused on cutting-edge technology and features.
  • CentOS is based on the same code as Red Hat Enterprise Linux (RHEL) and is often used in server environments.
  • Arch Linux is known for its simplicity and customizability.
  • Linux Mint is based on Ubuntu but offers a different user interface and a focus on multimedia.
  • Kali Linux is a security-focused distro that comes with a suite of tools for penetration testing and ethical hacking.


Some more important points of linux

  • ‌Linux is kernel not OS ( The kernel is the essential part of an operating system responsible for managing system resources and hardware interactions. It is the bridge between software applications and the computer’s hardware. On the other hand, an operating system refers to the complete package of software that comprises the kernel, system utilities, and various applications, all working together to provide a complete computing experience)
  • ‌Linux is not a UNIX derivative. It was written from scratch.
  • ‌A Linux distribution is the Linux Kernel and a Collection of Software that together, create an OS
  • CLI (Command Line Interface) of Linux is more popular
  • GUI (Graphical User Interface) of Windows is more Popular


Features and various advantages of linux

  • Open-source: Linux is completely open-source, that allows anyone to access, modify, and distribute the source code freely.
  • Security: Linux is known for its robust security features, which include built-in firewalls, encryption tools, and fewer vulnerabilities to malware and viruses. Due to its secure design, Linux is less susceptible to viruses and other forms of malware, and even in the event of an infection, it is harder for viruses to spread easily to other parts of the system.
  • Stability: Linux is a stable operating system that rarely crashes or requires frequent updates, making it reliable for continuous use.
  • Flexibility: Linux is highly customizable and can be tailored to meet specific needs and preferences, making it ideal for both personal and professional use.
  • Compatibility: Linux can run on a wide range of hardware platforms, from desktops to servers to mobile devices, making it versatile and accessible.
  • Free: Linux is often free to download and use, making it an affordable option for individuals and organizations, and also reducing the cost of ownership.
  • Large community: Linux has a large and active community of developers and users who contribute to its development, provide support, and create new software applications and tools.
  • Command-line interface: Linux provides a powerful command-line interface that allows users to perform complex tasks quickly and efficiently.
  • Software package management: Linux offers robust software package management tools that allow users to easily install, update, and remove software applications, ensuring security, and preventing software compatibility issues.
  • Performance: Linux is known for its high performance and speed, particularly in server environments where it can handle large workloads with ease, ensuring optimal system efficiency.


File System hierarchy in linux

/homeHome directory for other users
/rootIt is the home directory for root user
/boot It contains bootable files for linux
/etcIt contains all configuration files
/usrBy default software are installed in this directory
/binIt contains Commands used by all users including root user
/sbinIt contains Commands used by only root user
/optOptional application Software Packages 
/devEssential device files. This includes terminal devices, USB or any device attached to the  system.


One small suggestion from my side before we dive into the core linux commands!

Practicing Linux commands in a real Linux environment is the best way to learn and gain hands-on experience. If you already have a Linux distribution installed, I invite you to follow along with me and practice the commands as we explore the world of Linux together. So, open your Linux distribution and let’s dive into the exciting world of Linux commands together!

And if you haven’t installed Linux yet, don’t worry – I’ve got you covered 😊
Check out my post on how to easily install Linux on your existing Operating System, and then come back here to follow along with the core commands.

Read More: How to install Linux on your Windows or Mac Operating System easily


Getting started to learn linux and understand the various important commands associated

1. Cat Command : The cat command is one of the most universal tools, yet all it does is  standard Input to standard Output.

a) create file :

    [ root@ip ] cat > file1

    How are you ?

    ctrl + d


b) Add extra file content :

    [ root@ip ] cat >> file1

    I am fine..


c) Concatenate file :

    [ root@ip ] cat file1 file2 > all


d) Read file : 

    [ root@ip ] cat file1

    How are you?

    I am fine..


e) Print in reverse (See content Bottom to Top)

    [ root@ip ] tac file1

    I am fine..

    How are you?


2. Touch Command : Though we can create an empty file using touch Command but it is not just limited to it only.

TimeStamp

# Access Time (Last time when a file was accessed) : touch -a

# Modify Time (Last time when a file was modified) : touch -m

# Change Time (Last time when file metadata was changed) 

a) Create an empty file :

    [ root@ip ] touch file1


b) Create multiple empty file :

    [ root@ip ] touch file2 file3 file4


c) Change all timestamp of a file :

    [ root@ip ] touch file2

    [ root@ip ] stat file2
Stats shown…


d) Update only access time of file, modify time of file :

    [ root@ip ] touch -a file3  (For access time change)

    [ root@ip ] touch -m file4 (For modify time change)


3. Vi Editor

# A programmer text editor

# It can be used to edit all kinds of plain text, it is especially useful for editing programs.

# Mainly used for Unix Programs.

Note : 

:w –> To save

:wq –> To save & quit

:q –> quit

:q! –> Force Quit, no save

k l j h (Top Right Down Left) navigation

[ root@ip ] vi filea 

Vi Editor’s Screen Opens

Press i to insert

Write something!

Press :wq


4. Nano Command

a) To write data into a empty file :

    [ root@ip ] nano fileb 

    Screen Opens 

    Write something!

    Ctrl + x —> y to save —> Press Enter


b) To Edit a file :

    [ root@ip ] nano fileb

    Perform edit / addition of text etc.

    Ctrl + O —> Ctrl + x —> y to save —> Enter

Note : Vi is a standard whereas Nano has to be available depending on the Linux you use.


5. Mkdir Command : Used for creating directories

a) Creating multiple directories one inside another

    [ root@ip ] mkdir -p dir1/dir2/dir3 (p for parent)


b) Creating multiple directories

    [ root@ip ] mkdir dir4 dir5 dir6


6. Cd Command : Change directory

    [ root@ip ] pwd (To know the current directory, pwd is used which stands for print working  directory)

a) [ root@ip ] cd .. (Moving to parent directory)

b) [ root@ip ] cd ../../.. (Directly moving as per requirement) 

               OR cd dirc/dird/dire 


7. How to copy a file ?

[ root@ip ] cp  (Source) (Destination)

a) [ root@ip ] cp  file1 file2

b) [ root@ip ] cp  file1 dir1 


8. How to cut and paste file (Move) ?

     [ root@ip ] mv (Source) (Destination)

a) [ root@ip ] mv  file1 dir1 

b) [ root@ip ] mv  dir2 dir3


9. How to rename a file or directory ?

     [ root@ip ] mv (OldFileName) (NewFileName)

a) [ root@ip ] mv file1 newFile1

b) [ root@ip ] mv dir1  dir2

Note : Don’t get confused mv is the only command used to perform the move/rename operations


10. Ls Command :  ls command to list all the files/directories in the current directory

    [ root@ip ] ls 

(It will display all the files/directories present in the present working directory)


11. How to create Hidden file or directory ?

a) Creating hidden file 

     [ root@ip ] touch  .file1

     [ root@ip ] ls -a  ( ls command to list all the files/directories in the current directory where -a denoting all i.e. including hidden files ) 

b) Creating hidden directory

     [ root@ip ] mkdir .dirX

     [ root@ip ] ls -a


12. How to remove (delete) file or directory ?

a) rmdir : This cmd is used to remove the specified directory(empty)

b) rmdir -p : Remove both the parents and Child directory

c) rmdir -pv : Removes all the parent and subdirectories along with the Verbose

d) rm -rf : Removes even non-empty file and directory (rf is remove forcefully)

e) rm -rp : Removes non-empty directories including parent and subdirectory

f) rm -r : Removes empty directories


13. ls -l ( l signifies long list) : If we want to know what is a file and what is a directory

    [ root@ip ] ls -l


14. ls -al  OR  ls -la (all long list including hidden files) 

    [ root@ip ] ls -al


15. Less Command : This command will display the contents in the first page of a file

    [ root@ip ] less fileName (Use q to quit)


16. More Command : Used to view the contents of a file page wise.

    [ root@ip ] more fileName (and keep repeating)


17. Head Command : This command will display the 10 lines from top (default)

a) [ root@ip ] head fileName

b) [ root@ip ] head -2 fileName (Display 2 lines from top)


18. Tail Command : This command will display the 10 lines from the bottom (Default) 

a) [ root@ip ] tail fileName

b) [ root@ip ] tail -2 fileName (Display 2 lines from bottom)


Conclusion

By now, you should have a solid understanding of the history and basic concepts of Linux, as well as some essential commands and operations that you can use to navigate the command line interface. These fundamental skills will serve as a strong foundation as you continue to explore more advanced Linux topics.

In Part 2 of this series, we will delve even deeper into the world of Linux, exploring advanced commands, file systems, user management, and more. Whether you’re a seasoned Linux user or just getting started, you won’t want to miss this next installment

Thank you for reading, Till then Happy Learning! Happy Linux-ing! 😊

Remember to explore the Guides section for an abundance of invaluable technological insights, ensuring you stay at the forefront of the ever-evolving digital landscape. Follow us on Instagram and Twitter and never miss an update related to the latest and greatest happening there in the tech industry 🔥

Also Read : Learn Linux Easily: A Comprehensive Guide for Beginners and Intermediates PART-2

This:

Sayak Mukherjee

Hello, fellow tech enthusiasts. I'm Sayak, welcoming you to TheTechDelta. With a passion for tech innovations, I aim to share insights and empower you with impactful knowledge and tools. Whether you're a newbie or an expert, join us as we unravel the wonders of the tech universe together.

Leave a Reply