sudo
before install or update software, to gain root permission. If sudo
doesn't work, switch to the root user directly using:su root
sudo apt update
and sudo apt upgrade
.sudo apt update
: Checks for updates (index update).sudo apt upgrade
: Upgrades the software itself.Control + C
.which <software-name>
checks if a software is installed.sudo apt install <software-name>
tree
, wget
.ps -u $USER
: Shows processes running for the current user.top
: Lists users and their processes on the machine.export <variable_name>=<value>
(e.g., export cost_code=123
)echo $<variable_name>
wget
wget
command to download a file.wget <URL>
vi
or vim
vi
or vim
to create or edit a text file:vi <filename.txt>
i
to enter insert mode.Esc
to exit insert mode, type :wq
and press Enter (write and quit).Esc
to exit insert mode, type :q!
and press Enter (quit without saving).nano <filename>
Ctrl + X
to exit Nano. It will prompt to save the changes.