Basic Linux Commands Every Beginner Should Know
Introduction
When starting with Linux, it’s important to get familiar with basic commands. These commands help you navigate the system, check files, and understand where you are in the directory structure.
Step 1: Print Working Directory (pwd)
The pwd command shows your current location in the file system.
pwd
➡️ Example output: /home/user
Step 2: List Files and Directories (ls)
The ls command lists all files and directories in the current folder.
ls
➡️ Use ls -l for detailed information or ls -a to show hidden files.
Step 3: Change Directory (cd)
The cd command allows you to move to a different directory.
cd /home/user/Documents
➡️ Use cd .. to go up one level.
Step 4: Create a Directory (mkdir)
The mkdir command creates a new folder.
mkdir new_folder
➡️ This will create a directory called new_folder.
Step 5: Remove a Directory (rmdir)
The rmdir command removes an empty folder.
rmdir new_folder
➡️ Use rm -r folder_name if the folder is not empty.
Conclusion
Mastering these basic Linux commands will help you navigate the system with ease. In the next post, we will learn about file management commands such as creating, viewing, and editing files.

Comments
Post a Comment