apt is the package manager for Debian-based systems like Ubuntu. It simplifies installing, updating, and upgrading software from repositories. This tutorial covers basic commands for new Linux users. Always run commands with sudo for administrative privileges.
Refresh the list of available packages from repositories to ensure you have the latest information.
sudo apt updateExample: Before installing new software, update your package list.
sudo apt updateRun this regularly to keep your package information current.
Upgrade all installed packages to their latest versions for security and improvements.
sudo apt upgradeExample: Upgrade your system packages.
sudo apt upgradeYou may be prompted to confirm; type 'y' and press Enter to proceed. This keeps your system secure.
Install a specific package by its name.
sudo apt install package_nameExample: Install the text editor Vim.
sudo apt install vimReplace package_name with the actual name, such as firefox for the web browser. Use apt search keyword to find packages if unsure.
Tip: Remember to run sudo apt update before installing or upgrading. For more details, use man apt in the terminal.
sudo find /path/to/search -name "filename" # Find files by namesudo find /path/to/search -type d -name "directory_name" # Find directories by namesudo find /path/to/search -type f -name "filename" # Find files by namesudo find /path/to/search -exec rm {} \; # Find and delete files