Linux Commands
alias
Creates a shortcut for a command.
Example: alias ll='ls -lah'
cat
Displays the content of a file.
Example: cat file.txt
cd
Changes directory.
Example: cd /home/user/Documents
chmod
Modifies file permissions.
Example: chmod 755 script.sh
chown
Changes file owner.
Example: chown user:group file.txt
cp
Copies files or directories.
Example: cp file.txt /destination/
df
Shows disk space usage.
Example: df -h
du
Displays space used by a file/folder.
Example: du -sh my_folder/
echo
Prints text or writes to a file.
Example: echo "Hello" > file.txt
find
Searches for files based on criteria.
Example: find /home -name "*.txt"
grep
Searches for text within a file.
Example: grep "word" file.txt
history
Shows command history.
Example: history | grep "command"
htop
Interactive process viewer.
Example: htop
kill
Terminates a process.
Example: kill PID
locate
Quickly finds files (requires updatedb
).
Example: locate file.txt
ls
Lists files and directories.
Example: ls -l
mkdir
Creates a new directory.
Example: mkdir my_folder
mv
Moves or renames a file.
Example: mv old.txt new.txt
nano
Opens a simple text editor.
Example: nano file.txt
pwd
Displays the current directory path.
Example: pwd
ps
Lists running processes.
Example: ps aux
reboot
Restarts the system.
Example: reboot
rm
Deletes files or directories.
Example: rm -r my_folder
scp
Copies files between machines via SSH.
Example: scp file.txt user@server:/path/
shutdown
Shuts down the system.
Example: shutdown -h now
ssh
Connects to a remote server.
Example: ssh user@server
tar
Compresses and extracts .tar.gz
archives.
Example: tar -czvf archive.tar.gz folder/
top
Displays running processes and system info.
Example: top
touch
Creates an empty file.
Example: touch new_file.txt
uname
Shows system information.
Example: uname -a
wget
Downloads files from the web.
Example: wget http://example.com/file.zip
zip / unzip
Compresses and extracts .zip
files.
Example: zip archive.zip file.txt
/ unzip archive.zip
Want to explore more? Stay tuned for new terms and updates!