100+ Linux commands for Ubuntu

Boost your Linux skills with our essential guide to over 100 commands for Ubuntu! Easily explore different categories to find the perfect commands that will save you time and boost your command-line efficiency, making your Linux experience more powerful and streamlined.

ActionCommand
Permissions {0 = ---} | {1 = --x} | {2 = -w-} | {3 = -wx} | {4 = r--} | {5 = r-x} | {6 = rw-} | {7 = rwx}⚡
Repeats the last command⚡!!
Show current directory⚡pwd
Delete directory⚡rm -r [dir]
Create symbolic link to file⚡ln -s [file] [link]
Open or create a file using the Vi/Vim text editor⚡vi [file]
Change the ownership of a file⚡chown [user_name] [file]
Display a built-in manual for a command⚡man [command]
Search for a package⚡apt search [package_name]
Installs the package and dependencies⚡sudo apt install [package_name]
{Colorfull} All running processes⚡{h}top
Terminate a Linux process under a given ID⚡kill [process_id]
Show the PID of a process⚡pidof [process_name]
Connect to the host using a particular port⚡ssh -p [port] [user_name]@[host]
ActionCommand
Halts the current commandCtrl + C
Stops the current commandCtrl + Z
Brings to foregroundfg
Sends to backgroundbg
LogoutCtrl + D
Erases one word in the current lineCtrl + W
Erases the whole lineCtrl + U
Erases from the current cursor position to the end of the lineCtrl + K
Type to bring up a recent commandCtrl + R
Repeats the last command⚡!!
Log out of current sessionexit
Clear the terminal screenclear
Move cursor to the start of the lineCtrl + A
ActionCommand
List content of current directory {with hidden files}ls {-al}
Change directorycd [dir]
Change to homecd
Show current directory⚡pwd
Create a directorymkdir [dir]
Delete Filerm [file]
Delete directory⚡rm -r [dir]
Force remove filerm -f [file]
Force remove directoryrm -rf [dir]
Copy file1 to file2cp [file1] [file2]
Rename or move file1 to file2mv [file1] [file2]
Create symbolic link link to file⚡ln -s [file] [link]
Create or update filetouch [file]
Places standard input into filecat > [file]
Output the contents of filemore [file]
Output the first 10 lines of filehead [file]
Output the last 10 lines of filetail [file]
Display contents of a file page by page.more [file]
Show the contents of a file with navigation.less [file]
Open or create a file using the nano text editornano [file]
Open or create a file using the Vi/Vim text editor⚡vi [file]
Display directory sizedu -sh
Search for a filefind / -name [file_name]
Show disk usagedf -h
Find recently modified filesfind / -mtime -1
Display file typefile [filename]
ActionCommand
Display a line of textecho [text]
Set an environment variableexport
Create an alias for a commandalias [alias-name]='[command]'
Postpone the execution of a commandsleep [time-interval] && [command]
Create a job to be executed at a certain time (Ctrl+D to exit prompt after command)at [hh:mm]
View the current shell session IDecho $$
List all running jobsjobs
Run a command without saving it to history[command] & disown
ActionCommand
Assign an integer value to a variablelet "[variable_name]=[value]"
Export a Bash variableexport [variable_name]
Declare a Bash variabledeclare [variable_name]="[value]"
List names of all shell variables & functionsset [variable_name]
Remove an environment variableunset [variable_name]
Display the value of a variableecho ${variable_name}
ActionCommand
{0 = ---} | {1 = --x} | {2 = -w-} | {3 = -wx} | {4 = r--} | {5 = r-x} | {6 = rw-} | {7 = rwx}⚡
[Owners][Groups][All Users][_ _ _][_ _ _][_ _ _]
Assign read, write, and execute file permission to everyone (rwxrwxrwx)chmod 777 [file]
Change the ownership of a file⚡chown [user_name] [file]
Change the owner and group ownership of a filechown [user_name]:[group_name] [file]
Change permissions recursivelychmod -R [permissions] [dir]
ActionCommand
Archive an existing file or directorytar cf [archive.tar] [file/directory]
Extract an archived filetar xf [archive.tar]
Create a .gz compressed tar archivetar czf [archive.tar.gz]
{De}Compress .gz filesg{un}zip [file_name.{gz}]
ActionCommand
Display a built-in manual for a command⚡man [command]
Print the command history used in the terminal.history
Find files and directories that match the specified pattern in a specified locationfind [path] -name [search_pattern]
Search for a specific pattern in a file with grepgrep [search_pattern] [file_name]
Locate all files and directories related to a particular namelocate [name]
Find the source, binary, and manual page for a commandwhereis [command]
Connect via SSH protocolssh [user_name]@[host]
Connect via SFTP protocolsftp [user_name]@[host]
ActionCommand
Securely copy files between local and remote systems via SSHscp [file_name] [user_name]@[host]:[remote_path]
Connect to the host via SSH default port 22/23ssh [host]
Connect to the host via Telnet default port 22/23telnet [host]
ActionCommand
{Colorfull} All running processes⚡{h}top
Terminate a Linux process under a given ID⚡kill [process_id]
Terminate a process under a specific namepkill [process_name]
Terminate all processes with a given labelkillall [label]
List processes based on the provided keyword.pgrep [keyword]
Show the PID of a process⚡pidof [process_name]
List and resume stopped jobs in the backgroundbg
Bring (most recent)/(particular) suspended job to the foregroundfg {[job]}
List files opened by running processeslsof
Catch a system error signal in a shell script. Executes provided commands when the signal is caughttrap "[commands]" [signal]
Pause the terminal or a Bash script until a running process is completedwait
Run a Linux process in the backgroundnohup [command] &
Display system uptimeuptime
Show current processes by userps -U [user]
ActionCommand
Connect to a remote host as a user via SSHssh [user_name]@[host]
Securely connect to a host via SSH default port 22⚡ssh [host]
Connect to the host using a particular portssh -p [port] [user_name]@[host]
Generate SSH key pairsssh-keygen
Start SSH server daemonsudo service sshd start