πŸ–₯️ Basic Linux Commands: A Beginner's Guide

πŸ”Ή Introduction

Linux commands help users interact with the operating system through the command line. Here’s a quick guide to some of the most essential Linux commands for navigation, system information, and file management.


πŸ“Œ System Navigation & Information Commands

πŸ“– man (Manual Pages)

Usage: Displays the manual page for a command.

man ls

πŸ”Ή Example: man pwd will show details about the pwd command.

πŸ“ pwd (Print Working Directory)

Usage: Displays the current directory path.

pwd

πŸ”Ή Example Output: /home/user

πŸ“‚ ls (List Files)

Usage: Lists files and directories in the current location.

ls
ls -l
ls -a
ls -la

πŸ”Ή Options: -l (detailed view), -a (show hidden files), -h (human-readable file sizes)

πŸ“‚ cd (Change Directory)

Usage: Moves between directories.

cd /home/user/Documents

πŸ”Ή Example: cd .. moves to the parent directory.

πŸ” uname (System Information)

Usage: Shows system information.

πŸ” uname -r (Kernel Version)

Usage: Displays the Linux kernel version.

uname
uname -r

πŸ‘€ whoami (Current User)

Usage: Prints the currently logged-in user.

whoami

πŸ“œ history (Command History)

Usage: Displays previously executed commands.

history

πŸ”Ή Example: history | grep ls will filter history for ls commands.

πŸ“… date (Current Date & Time)

Usage: Shows the current system date and time.

date

πŸ”Ή Example Output: Tue Feb 6 14:45:20 UTC 2025

πŸ“ File & Folder Management Commands

πŸ“‚ rmdir (Remove Empty Directory)

Usage: Deletes an empty directory.

rmdir foldername

πŸ”Ή Example: rmdir old_folder

πŸ—‘οΈ rm (Remove File)

Usage: Deletes files.

rm filename

πŸ”Ή Example: rm document.txt

🚨 rm -rf (Force Remove)

Usage: Recursively deletes files and directories forcefully.

rm -rf foldername

πŸ”Ή Example: rm -rf /home/user/temp ⚠️ Caution: This command permanently deletes files with no recovery.

πŸ“‹ cp (Copy Files & Folders)

Usage: Copies files or directories.

cp source destination

πŸ”Ή Example: cp file1.txt /home/user/backup/

βœ‚οΈ mv (Move/Rename Files & Folders)

Usage: Moves or renames files and directories.

mv oldname newname

πŸ”Ή Example: mv report.docx /home/user/Documents/


🎯 Conclusion

Mastering these basic Linux commands will help you efficiently manage files, navigate directories, and gather system information. Stay tuned for more advanced Linux topics! πŸš€

πŸ“Œ Next Up: File Permissions & User Management Commands! πŸ”

Β