
Hello tech enthusiasts! Today, we're diving deeper into the Linux world with some must-know commands. Let's unravel the power of these essentials! 💡💻
Basic Linux Commands:
1. Present Working Directory (pwd):
pwd
It reveals your current location in the Linux system.
2. List Files and Directories (ls):
ls
This handy command shows available files and directories in the present working directory.
3. Kernel Name (uname):
uname
It displays the name of the kernel (OS).
4. Kernel Version (uname -r):
uname -r
Check out the version of the kernel with this command.
5. Change Directory (cd):
cd directory_name
Use cd to navigate through directories effortlessly.
6. Clear Screen (clear):
clear
Keep your terminal neat and tidy with this command.
7. Current User (whoami):
whoami
Discover the currently logged-in user's name.
8. Command History (history):
history
Access a list of previously used commands.
9. Date and Time (date):
date
Stay on track with this command displaying the current time and date.
10. Copy Files or Directories (cp):
cp source destination
Duplicate files or directories with the cp command.
11. Move or Rename Files or Directories (mv):
mv source destination
Use mv to move files or directories to a new location or rename them.
12. Remove/Delete Files (rm):
rm filename
rm deletes files. Be cautious with this powerful command!
13. Remove/Delete Directory (rmdir):
rmdir directory_name
Safely remove an empty directory using rmdir.
14. Remove/Delete Directory (rm -r):
rm -r directory_name
To remove a directory and its contents, use rm -r. Exercise caution!
15. Show Disk Usage (df):
df
Discover disk space usage on your system with the df command.
16. Show Disk Usage (du):
du
Check disk space usage for a specific directory using du.
17. Create Empty File (touch):
touch filename
touch creates an empty file quickly.
18. Search for Files or Directories (find):
find /path/to/search -name filename
find searches for files or directories based on specific criteria.
19. Show Running Processes (ps):
ps
Monitor running processes with the ps command.
20. Kill/Stop a Process (kill):
kill process_id
kill stops a running process using its ID.
21. Create Single Directory:
mkdir directory_name
The basic mkdir command creates a single directory with the specified name.
22. Create Multiple Directories:
mkdir dir1 dir2 dir3
To create multiple directories in one go, list their names after mkdir.
23. Create Directory Path (Nested Directories):
mkdir -p path/to/directory
The -p flag allows you to create a directory path, even if intermediate directories don't exist.
24. Create Numbered Directories:
mkdir dir{1..5}
Use curly braces with a range to create a series of numbered directories.
25. List All Files, Including Hidden Ones (ls -a):
ls -a
The -a flag extends the ls command, revealing all files, including the hidden ones, in your present working directory.
Well, that's a wrap for this blog. Stay cool, stay humble! 😎🚀
About the author
Hello there! I'm Tanishq, a student with a passion for mastering the intricacies of DevOps as well as Development Field. Eager to leverage technology to streamline development processes and drive innovation.
Comments
Join the discussionNo comments yet. Be the first to comment.




