I started using Linux in late 1990’s when there were few books around that explained the basics. One of my favorite hand guides back then was the One Page Linux Manual. It had lists of many basic commands that I needed to navigate the files system. Here’s a list of some of the most basic commands than any new users needs to get started using Linux. I asked ChatGPT to provide a list of basic Linux commands in a Markdown table format. I copied that into my Marktext, my favorite Markdown editor and exported it to an HTML format. If you are new to Linux I hope this is helpful.
Command | Description |
---|---|
pwd | Print the current working directory |
ls | List files and directories in the current directory |
cd [directory] | Change directory to the specified path |
mkdir [directory] | Create a new directory |
rmdir [directory] | Remove an empty directory |
rm [file/directory] | Remove files or directories (use -r for directories) |
cp [source] [destination] | Copy files or directories |
mv [source] [destination] | Move or rename files or directories |
cat [file] | Display the content of a file |
less [file] | View a file one screen at a time |
touch [file] | Create an empty file or update file’s timestamp |
echo [text] > [file] | Write text to a file |
nano [file] | Edit a file using Nano editor |
vim [file] | Edit a file using Vim editor |
find [path] -name [name] | Search for files or directories by name |
grep [pattern] [file] | Search for a specific pattern in a file |
chmod [permissions] [file] | Change file permissions |
chown [user]:[group] [file] | Change file ownership |
df -h | Display disk space usage in human-readable format |
du -h [directory] | Show size of files and directories |
ps aux | Display all running processes |
top | Monitor running processes in real time |
kill [PID] | Terminate a process by its process ID |
tar -cvf [archive.tar] [files] | Archive files into a tar file |
tar -xvf [archive.tar] | Extract files from a tar archive |
zip [archive.zip] [files] | Compress files into a zip archive |
unzip [archive.zip] | Extract files from a zip archive |
wget [url] | Download files from the internet |
curl [url] | Transfer data from or to a server |
scp [source] [user@host:destination] | Securely copy files between systems |
ssh [user@host] | Connect to a remote system via SSH |
history | Show command history |
alias [name]='[command]' | Create an alias for a command |
df -T | Display file system types |
free -h | Show memory usage in human-readable format |
uname -a | Display system information |
uptime | Show system uptime and load average |
reboot | Restart the system |
shutdown -h now | Shut down the system immediately |
man [command] | Show the manual page for a command |
exit | Exit the current session |