I know that there are three command to update and then upgrade the whole system, these are:
- sudo apt-get update # Fetches the list of available updates
- sudo apt-get upgrade # Strictly upgrades the current packages
- sudo apt-get dist-upgrade # Installs updates (new ones)
Is there a super-upgrade command that combines all these commands to one?
There are 3 decent choices:
You could create a script something like the following:
#!/bin/bash
set -e
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgradeCall it something like
update.sh
and place it in/usr/local/bin
and then make the script executable by running:sudo chmod +x /usr/local/bin/update.sh
Another method would be to create a bash alias (in
~/.bashrc
) or wherever you normally store your aliases:alias update='sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade'
A final method would be to simply string the 3 commands together on the commandline:
sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
A few choices...
Reference:
No comments:
Post a Comment