"sudo" means Super User Do. The Super User can do a lot of things like downloading and installing. We can run any command as an administrator using "sudo"
But You must be careful to use this command. If you type a command incorrectly, you will destroy the system.
Sometimes, It acts like a regular user and sometimes It's the root. By default, the root account password is locked. So you cannot login as root directly. You have to use the root password.
When sudo asks for a password, just type your password. It's Your user password that used to login to your device. It'll work.
When using sudo, your password is stored by default for 15 minutes. After that time, you need to re-enter your password.
**********
Common Sudo Commands
- Update your database
$ sudo apt-get update
this commands updates your database and let your system know if there are newer packages available or not.
- Upgrade your db
ok.. after the update, you need to upgrade the installed package. So you can use this command.
$ sudo apt-get upgrade
if you want to upgrade a particular package, use this command
$ sudo apt-get upgrade <type your package name here>
- Install a new program
if you want to install a program to your device, you can use this command
$ sudo apt-get install <type the program name you want to install here>
ex- sudo apt-get install gimp
- Remove a program
Sometimes you want to remove an installed program. then you can use this command.
$ sudo apt-get remove <the installed package>
This command only remove the software and not the configuration files or other data files. So when you need to re-install, you have same settings. if you want to remove the package completely,, use this.
$ sudo apt-get purge <package-name>
- to remove unnecessary packages
$ sudo apt-get autoremove
when you install an application, the system will install some other software that need to run your program. like some libraries. But when you remove your software, the installed software by system will remain longer. so with this autoremove command you can remove them also.
No comments:
Post a Comment