sudo
sudo
is a basic command that stands for "Switch User Do." It is often used as a means to safely run a command as root without directly logging into the root account. It is prepended before another command and is used to update packages, and modify system configurations not in userspace. Ex. files in /etc/* or /boot/* some direct usage examples are as follows:
- This command switches to the root account, tells the package manager to update the the package database, and then tells the package manager to upgrade any available packages in Debian/Ubuntu + Arch/Manjaro
sudo apt update && sudo apt upgrade
sudo pacman -Syu
- This command tells nano to open
/etc/pacman.conf
with the root account so any changes are saved to disk and not read-only since it is a system file.sudo nano /etc/pacman.conf
- This command should not be run with
sudo
unless you really want to delete EVERYTHING, but thats what this does. It ignores any user permissions and deletes everything in the root folder.sudo rm -rf /