Linux Tutorial For Beginners ๐Ÿ”ฅ๐Ÿ”ฅ

Linux Tutorial For Beginners ๐Ÿ”ฅ๐Ÿ”ฅ

ยท

5 min read

In this blog, we are going to learn basic commands which every beginner should know about.


What is Linux?

Linux is an open-source, Unix-like operating system kernel originally created by Linus Torvalds in 1991. It serves as the core component of many different Linux distributions or "distros." A Linux distribution is a complete operating system that includes the Linux kernel, system utilities, libraries, and often a graphical user interface (GUI).


What is Bash?

Bash, short for "Bourne Again Shell," is a widely used Unix-like shell or command-line interpreter for Linux and other Unix-based operating systems. It is the default shell for most Linux distributions and is designed to provide a text-based interface for interacting with the operating system.


Why use Linux?

There are several compelling reasons to use Linux as your operating system of choice. Whether you're an individual user, a developer, a system administrator, or an organization, Linux offers a range of benefits that make it a popular and powerful choice. Here are some of the key reasons to use Linux:

  1. Open Source and Free: Linux is distributed under open-source licenses, which means you have access to its source code and can modify and distribute it freely. This reduces software costs and allows for greater transparency and security.

  2. Customization: Linux is highly customizable. You can choose from a variety of desktop environments, themes, and software packages to create a personalized computing experience that suits your preferences.

  3. Stability and Reliability: Linux is known for its stability and reliability. It can often run for long periods without needing to be rebooted, making it a dependable choice for servers and critical systems.

  4. Security: Linux has a robust security model with user-based permissions and a separation between user and administrative privileges. It's less susceptible to malware and viruses compared to other operating systems.

  5. Performance: Linux is efficient in terms of system resource usage. It can run on older hardware and still provide excellent performance, making it suitable for various devices, including low-power systems.

  6. Vast Software Repository: Most Linux distributions offer extensive software repositories with thousands of applications, libraries, and development tools. You can easily install and update software using package managers.

  7. Command Line Power: Linux provides a powerful command-line interface (CLI) that allows you to perform a wide range of tasks efficiently. This is particularly valuable for developers, system administrators, and power users.


Basic Commands for Bash Terminal

Navigation:

  1. ls :
    The ls command in Bash is used to list the files and directories in the current working directory. It helps you view the contents of the directory you are currently in. Here's how you can use the ls command:

  2. pwd :
    The pwd command in Bash stands for "Print Working Directory." It's used to display the full path of the current working directory you are in. Here's how you can use the pwd command:

  3. cd :
    The cd command in Linux is used to change the current working directory. It allows you to navigate between different directories in the file system. Here's how you can use the cd command:

File and Directory Manipulation

  1. mkdir :
    The mkdir command in Bash is used to create new directories (folders) in the file system. It allows you to create one or more directories at a time. Here's how you can use the mkdir command:

  2. touch :
    The touch command in a Bash terminal is used to create new empty files or update the access and modification timestamps of existing files without altering their content. The basic syntax of the touch command is as follows:

  3. cp :
    The cp command in a Bash terminal is used to copy files or directories from one location to another. The basic syntax of the cp command is as follows

  4. mv :
    The mv command in a Bash terminal is used to move files or directories from one location to another. It can also be used to rename files and directories. The basic syntax of the mv command is as follows:

  5. rm :
    The rm command in a Bash terminal is used to remove (delete) files or directories. It stands for "remove." However, be cautious when using this command, as it permanently deletes files and directories without moving them to the trash or recycling bin. Once deleted, the data is typically unrecoverable unless you have backups.

Viewing and Editing Files

  1. cat :
    The cat command in a Bash terminal is used to concatenate and display the contents of one or more files. It's short for "concatenate." The cat command is quite simple and versatile, but its primary purpose is to display the contents of a file on the terminal

  2. vim :
    Vim is a powerful text editor that can be used within a Bash terminal. To start Vim, you typically open your terminal and type:

    To write in the document we need to click and go in Insert mode to insert our input in our document.

    To Save our changes we need to click escape button so that we get out of insert mode then we will type :x to save and exit vim.

Getting Help

  1. man :
    The man command in a Bash terminal is used to display the manual pages for various Unix-like operating system commands and functions. It provides detailed documentation and information about how to use these commands effectively. The term "man" stands for "manual."

Process Management

  1. ps :
    The ps command in a Bash terminal is used to display information about currently running processes on a Unix-like operating system. It provides a snapshot of the processes that are currently active, along with their various attributes. The command has various options that allow you to customize the output to show different levels of detail. Here's the basic syntax:

  2. htop :
    htop is a command-line process viewer and system monitor for Unix-like operating systems. It provides an interactive and more user-friendly way to monitor system resources and manage running processes compared to the traditional top command.


So, in this blog, we learned about What is Linux, What is Bash, Why to use Linux and Basic commands for Bash Terminal. There is much more to learn about Linux Commands and Bash Terminal, explore this topic and its used cases and elevate your skills.

Adios Amigos ๐Ÿ‘‹๐Ÿ‘‹

Did you find this article valuable?

Support Coding Adda by becoming a sponsor. Any amount is appreciated!

ย