π₯οΈ Basic Linux Commands
Basic Linux Commands β A Beginnerβs Guide

π¨βπ» Last-year student diving deep into DevOps, Cloud Engineering, and Infrastructure Automation. Passionate about building scalable, efficient, and secure systems. Letβs connect and build something amazing! π
π 1. Listing Commands (ls)
lsβ π List files and directories.ls -lβ π Detailed list with permissions, size, owner, etc.ls -aβ π Show hidden files.ls -lhβ π Human-readable file sizes.ls -d */β π List only directories.ls *.shβ π οΈ Show only.shfiles.
πΉ Example:
ls -lh
ls -a
π 2. Directory Commands
pwdβ π Show current directory path.cd folderβ π Change directory.cd ..β β¬οΈ Move one level up.cd -β π Switch to previous directory.cd ~β π Go to the home directory.
π Creating Directories (mkdir)
mkdir newFolderβ ποΈ Create a new folder.mkdir .NewFolderβ π Create a hidden folder.mkdir A B C Dβ π Create multiple folders at once.mkdir /home/user/Mydirectoryβ π Create a folder in a specific location.mkdir -p A/B/C/Dβ π Create nested directories.
πΉ Example:
mkdir newFolder
mkdir .NewFolder
mkdir A B C D
mkdir /home/user/Mydirectory
mkdir -p A/B/C/D
π Deleting Directories (rmdir, rm -r)
rmdir folderβ β Remove empty directory.rm -r folderβ π¨ Remove non-empty directory.
πΉ Example:
rmdir emptyFolder
rm -r oldFolder
π 3. File Management
touch file.txtβ π Create a new empty file.cat file.txtβ π View file content.cp file1 file2β π Copy file.mv old newβ βοΈ Rename/move file.rm file.txtβ β Delete a file.vim file.txtβ βοΈ Open file in the Vim text editor.
πΉ Example:
touch notes.txt
cp notes.txt backup.txt
rm unwanted.txt
vim myfile.txt
π 4. Searching Files & Text
find /path -name filenameβ π Find file by name.grep "word" file.txtβ π Search inside a file.
πΉ Example:
find /home -name "notes.txt"
grep "error" log.txt
βοΈ 5. System & Process Management
df -hβ πΎ Check disk space.free -mβ π Check RAM usage.topβ π View real-time system processes.kill PIDβ β Stop a process of mentioned process ID (PID).
πΉ Example:
df -h
top
kill 1234




