Basics
Core Commands
# List files and directories
ls
ls /home
ls –al
ls –al /home/student
# Change current directory
cd /home
# Print current directory
pwd
# Copy files
cp a.txt /home
cp a.txt b.txt
# Move or rename file
mv a.txt /home
mv a.txt b.txt
# Remove empty directory
rmdir test
# Remove file or Non empty directory
rm a.txt
rm –r test
# Create directory
mkdir test
# Print file content
cat a.txt
# Search for text in file
grep "word" a.txt
# Display the first 10 lines of a file
head a.txt
head –n 5 a.txt
# Display the last 10 lines of a file
tail a.txt
tail –n 5 a.txt
tail –f a.txt
# Display text from file in one screen
less a.txt
# Display list of running processes
ps aux
# Display list of open files
lsof –i
# Display network connections
netstat –antp
# Display network information
ifconfig
# Sort content of a file
sort a.txt
# Remove duplicate lines (sort first)
uniq a.txt
# Display information about a file
stat a.txt
# Test network connectivity
ping google.com
# Display current user
whoami
# Change user passwd
passwd student
# Terminate process
kill 1845
# Search on files
find / -name a.txt
find / -name "*.txt"
# Text editor (Save: Ctrl+X)
nano filenameCreate link file

Special Characters
Redirection

Piping
Environment Variables
User Management
Important Files
/etc/passwd
/etc/shadow
/etc/group
SU
Sudo
Linux Boot Process

Linux Run Levels

Services
File System

File Permissions

Installing Software
Last updated