Topics Map > IT Operations

Basic Terminal Commands on Ubuntu

Essential terminal commands to perform basic functions and troubleshooting on Ubuntu

Understanding the Terminal

On an Ubuntu system you can find a launcher for the terminal by clicking on the Activities item at the top left of the screen or pressing the windows key, then typing the first few letters of “terminal”, “command”, “prompt” or “shell”. You can also simply use the keyboard shortcut  Ctrl + Alt + T to open a new terminal window.

Basic Terminal Commands

Essential terminal commands to perform basic functions and troubleshooting on ubuntu

Basic Linux Commands

Command

Explanation

Example

sudo

Used before a command to run as root or an administrator.

“sudo apt-get update”

ls

The ls command stands for list, it lIsts down all the directories and files inside the present working directory or specified directory

“ls”, “ls desktop” 

ls -l

The ls command stands for Long listing, this allows you to see additional details about files like file size, permission, modified time, etc.

“ls -l” “ls -l Desktop”

cd

The cd command stands for change directory; with this, you can change your location and move to another directory.

“cd”, “cd Downloads”

rm

The rm command stands for remove, this is used to delete files.

“rm useless_file”

mv

The mv command stands for move, it allows you move a file to a different location. 

“mv ”

dir

Used to display the list of all directories or folders in the current directory. 

“dir” “dir Downloads”

mkdir

The mkdir command stands for make directory, this allows you to make directories/folders.

“mk dir new_folder”

apt

The apt command is used for installing, removing and managing packages in Ubuntu. It has to be used with sudo because these are administrative tasks.

Install: “sudo apt install new_file ”

Remove: ”sudo apt remove daniel_sharpiro”

Update System: “sudo apt update && sudo apt upgrade”

sudo apt-get update 

This command fetches the latest version of each package but will not actually download or install any of those updates.

“sudo apt-get update” 

sudo apt-get upgrade

This command downloads and installs the updates for each outdated package and dependency on your system

“sudo apt-get upgrade”

ip a

This command is used to find the ip address of a computer

“ip a”

ifconfig 

This command is used to display networking information about a computer

“ifconfig ”

clear

This command allows you to clear the terminal. It is useful if your terminal screen is flooded and you want to do something new.

“clear”

exit

This command is used to exit the terminal

“exit”

shutdown -now

This command is used to shutdown a computer immediately.

“shutdown -now”






Keywords:terminal commands cmd sudo ls cd Ubuntu   Doc ID:128540
Owner:Ojie O.Group:University of Maryland Engineering IT
Created:2023-05-24 14:55 EDTUpdated:2023-05-24 15:14 EDT
Sites:University of Maryland Engineering IT
Feedback:  0   0