🐧Day 2 - Linux & Basic Commands : Part-I

🐧Day 2 - Linux & Basic Commands : Part-I

🐧What is Linux?

Linux is an open-source, powerful and versatile operating system known for its command-line interface, which allows users to perform a wide range of tasks efficiency. Linux is available to users at no cost. An operating system is the software that directly manages a system's hardware and resources, like CPU, memory, and storage.

The main components of Linux operating system are:

  1. Applications: Applications in the Linux architecture are software programs that run on top of the operating system and interact with its components.

  2. Shell: In Linux, the shell is a command-line interface that allows users to interact with the system through a set of commands. The most popular shell in Linux is the Bash shell.

  3. Kernel: The kernel is the central component of the Linux operating system architecture. It manages system resources and provides services to applications and processes running on the system.

  4. Hardware: The lowest level of the Linux architecture is the hardware layer. This layer comprises the physical components of a computer, such as the hard drive, RAM, motherboard, CPU, network interfaces, and peripherals.

🚀Basic Linux Commands

1.⚜️File Commands

ls option_flag arguments  #list the sub directories and files available in the present directory

ls -l                     #list the files and directories in long list format with extra information

ls -a                     #list all including hidden files and directory

ls *.sh                   #list all the files having .sh extension.

ls -i                     # list the files and directories with index numbers inodes

ls -d */                  # list only directories.(we can also specify a pattern

2.⚜️Directory commands

mkdir dirName             # make a new directory 'dirName'

mkdir .Newdir             # make a hidden directory (also . before a file to make it hidden)

mkdir A B C D             #make multiple directories at the same time

mkdir /home/user/Mydir    # make a new folder in a specific location

mkdir -p  A/B/C/D         # make a nested directory

pwd                        #This command will display the full path to the current directory.

cd path_to_directory      #change directory to the provided path

cd ~ or just cd           #change directory to the home directory

cd -                      # Go to the last working directory.

cd ..                     # change directory to one step back.

cd ../..                  # Change directory to 2 levels back.

🎇Conclusion

In short, Linux has a bunch of useful commands and tools to handle files and directories. The ones we covered here are just a starting point, and whether you're new to Linux or a pro, these commands will be super handy for your everyday tasks in Linux.

I'm confident that this blog will prove to be valuable, helping you discover new insights and learn something enriching .🙏

😊Happy Learning : )

Did you find this article valuable?

Support Pratik R. Mandge by becoming a sponsor. Any amount is appreciated!