UBUNTU BASIC COMMANDS 1 Flashcards
allows you to run programs or other commands with administrative privileges, just like “Run as administrator” in Windows.
sudo
(Super User DO)
It is used to install, update, upgrade and remove any package. apt get basically works on a database of available packages.
apt-get
This command updates the database and let your system know if there are newer packages available or not.
apt-get update
super user privileges is the first command you need to run in any Linux system after a fresh install.
After updating the package database, next step is to to upgrade the installed packages.
apt-get upgrade
sudo apt-get upgrade < package-name >
installs a desired package
(If you know the name of the package, then you can easily install a program using this command)
apt-get install
sudo apt-get install < package-name >
removes the installed program.
-only removes the software from your system but not the configuration or data files of the package.
apt-get remove
is used when you want to remove a software completely from your system with its configuration or data files so that no longer personalized settings will be available during
reinstallation.
apt-get purge
sudo apt-get purge < package-name >
command is used to remove any unnecessary packages
- will remove those dependencies that were installed with applications and that are no longer used by anything
else on the system.
apt-get autoremove
lists all files and folders in your current working directory. You can also specify paths to other directories if you want to view their contents.
ls(list)
ls Documents
- also known as chdir used to change the current working directory.
cd(change director)
Takes you to the root directory
cd /
Takes you up one directory level
cd ..
Takes you to the previous directory
cd -
displays the full pathname of the current working directory.
pwd(print working directory)
allows you to copy a file.
You should specify both the file you want to be copied and the location you want it copied to
cp(copy)