Linux Commands
Linux Commands
to Advanced
1 Introduction
This document provides a concise guide to Linux commands, categorized
into basic, intermediate, and advanced levels. Each command includes a
brief description and example usage. This guide is designed for beginners
to advanced users seeking a quick reference.
2 BasicCommands
These commands are essential for navigating and managing files, directo-
ries, and system information.
2.1 NavigatingtheFileSystem
• pwd: Displays the current directory.
1 pwd
2 % Output: /home/user
2.2 FileandDirectoryManagement
• mkdir: Creates a new directory.
1 mkdir new_folder
2.3 ViewingandEditingFiles
• cat: Displays file contents.
1 cat file.txt
3 Intermediate Commands
These commands introduce process management, text processing, and net-
working.
3.1 ProcessManagement
• ps: Lists running processes.
1 ps aux % Show all processes
3.2 TextProcessing
• grep: Searches for patterns in files.
1 grep "error" log.txt
2 grep -r "error" /path/ % Recursive search
3.3 Networking
• ping: Checks connectivity to a host.
1 ping google.com
Siva Banavathu
4 AdvancedCommands
These commands are for system administration, advanced networking, and
scripting.
4.1 SystemAdministration
• sudo: Runs commands as superuser.
1 sudo apt update % Update package lists
4.2 AdvancedNetworking
• nmap: Scans network for hosts/services.
1 nmap 192.168.1.1
5 TipsforUsingLinuxCommands
• Use man <command> for detailed documentation.
• Combine commands with pipes (|) and redirection (>, »).
• Practice in a safe environment to avoid accidental system changes.
6 ExampleWorkflow
To find and compress all .log files modified in the last day:
1 find /var/log -type f -name "*.log" -mtime -1 | xargs tar -zcvf logs
.tar.gz
Siva Banavathu
📁 File and Directory Management
Command Description
cd Change directory
Siva Banavathu
🧑💻 User Management
Command Description
Siva Banavathu
💻 System Monitoring & Processes
Command Description
🌐 Networking
Command Description
Siva Banavathu
📦 Package Management
Debian/Ubuntu (APT)
Command Description
Siva Banavathu
🔄 Archiving & Compression
Command Description
⏲️ Scheduling Tasks
Command Description
Siva Banavathu
🧪 Scripting
Command Description
sh Start shell
📙 To Learn More
Command Description
Siva Banavathu