101 Ubuntu Terminal Commands with Examples [2023 latest guide]
If you are new to Ubuntu or looking to improve your command-line skills, this list of 101 Ubuntu commands with examples is a great resource to help you navigate and manage your system more efficiently. From basic file and directory commands to advanced system and network commands, this list covers all the essentials you need to know.
Basic Ubuntu Commands
- ls
The ls
command is used to list files and directories in the current working directory. To list all files and directories in the current directory, type
- cd
The cd
command is used to change directories. To change to the home directory, type
cd ~
- pwd
The pwd
command is used to print the current working directory. To print the current directory, type
pwd
File and Directory Commands
- mkdir
The mkdir
command is used to create a new directory. To create a new directory named
docs
, type
mkdir docs
- touch
The touch
command is used to create an empty file or update the timestamp of an existing file. To create a new file named example.txt, type
touch example.txt
- cp
The cp
command is used to copy files or directories. To copy a file named file1 to a directory nameddir1 type
cp file1 dir1
System Commands
- top
The top
command is used to display real-time information about system processes. To display information about running processes, type
top
- ps
The ps
command is used to display information about system processes. To display information about all running processes, type
ps aux
- kill
The kill
command is used to terminate a process. To terminate a process with ID 1234, type
kill 1234
Network Commands
- ifconfig
The ifconfig
code>command is used to display information about the network interfaces. To display information about all network interfaces, type
ifconfig
- ping
The ping
command is used to test network connectivity. To ping a website, type
ping www.example.com
Leave a Reply