The Linux terminal serves as the interface between users and the kernel, interpreting shell commands that control system operations. Mastering these commands is essential for effective system management.
Keyboard Shortcuts
- Ctrl+Alt+T: Launch new terminal
- Ctrl+Shift+N: Open terminal in current directory
Privilege Escalation
The sudo comand allows regular users to execute administrative tasks:
user@host:~$ sudo apt update
[sudo] password for user:
User Management
Switch between user accounts with su:
regular@host:~$ sudo su
root@host:~# exit
regular@host:~$
Command Structure
Linux commands follow this pattern:
command [options] [arguments]
Directory Navigation
Key directory commands:
ls # List contents
cd /var # Change directory
pwd # Show current path
File Operations
Essential file commands:
touch newfile.txt # Create file
rm oldfile.txt # Delete file
cp file1 file2 # Copy file
mv file1 /tmp # Move file
System Information
date # Show system time
df -h # Display disk usage
ps aux # List running processes
ifconfig # Network configuration
File Compression
Archive and compress files:
tar -czvf archive.tar.gz /path/to/files
tar -xzvf archive.tar.gz
Permissions Management
Modify file permissions:
chmod 755 script.sh
chown user:group file.txt
Network Utilities
ping google.com
which curl
file document.pdf
System Maintenance
alias ll='ls -alF' # Create shortcut
clear # Reset terminal