Linux: Basics Fundamentals of Linux




Linux, an open-source operating system kernel, has gained immense popularity over the years for its stability, security, and flexibility. If you're new to the Linux world, let's embark on a journey through some fundamental concepts that will help you navigate this powerful operating system.

1. Understanding the Shell

At the core of Linux lies the shell, a command-line interface that allows users to interact with the system. The default shell is usually Bash (Bourne Again SHell). Learning basic commands such as ls (list), cd (change directory), and pwd (print working directory) is crucial for navigating through the file system.

$ ls

$ cd /home/user

$ pwd


2. File System Hierarchy

Linux organizes its file system in a hierarchical structure. Key directories include /bin (binary files), /etc (configuration files), /home (user directories), and /var (variable data such as logs). Understanding this structure is essential for locating and managing files.

$ cd /etc

$ cat hosts


3. Users and Permissions

Linux is a multi-user system, and understanding user management is vital. The /etc/passwd file stores user information, and the /etc/group file contains group information. File permissions are managed using the chmod command, and ownership is controlled by chown.

$ cat /etc/passwd

$ chmod 755 myfile

$ chown user:group myfile


4. Package Management

Most Linux distributions use package managers to handle software installation and updates. For example, on Debian-based systems like Ubuntu, you use apt, and on Red Hat-based systems like Fedora, you use yum or dnf.


For Debian based:

$ sudo apt update

$ sudo apt install htop

$sudo apt remove htop


For Redhat based:

$ sudo yum install htop

$ sudo yum remove htop





5. Process Management

Understanding processes is crucial for monitoring and managing system performance. Commands like ps, top, and kill help you view and control running processes.

$ ps aux

$ top

$ kill PID



6. Text Editors

Text editors are essential for modifying configuration files and creating scripts. Common editors include nano, vim, and emacs. Choose one that suits your preference.

$ nano myfile.txt $ vim myfile.txt


Refer below snap,



==========================================================================                                         

                                  Thank you, check out more blogs for such information..... !


For any queries,feel free to reach out me on shubhammore07007@gmail.com

Comments

Popular posts from this blog

Terraform project with AWS to build infra within seconds! (Web Ec2 with eIP)

AWS: Serverless REST API (API Gateway + Lambda + DynamoDb + WAF)

Nginx : Setting Up Nginx with Load Balancing