An Ubuntu update Command
I have an alias I like to use on Ubuntu that goes something like this:
alias update=apt update; apt upgrade -y
But there’s an improvement that I made recently I’d like to share. First run this to get the tool.
apt install debian-goodies
Then run this command checkrestart.
checkrestart
checkrestart checks to see if you currently need to restart any running applications in order to fully benefit from the upgrade you just did. So if a process is using libraries that were updated, for example.
So that leaves me with an updated update command that looks like this:
alias update=apt update; apt upgrade -y; checkrestart
Add that to your shell’s configuration and now you can run update to fully update your system and see if anything needs to be restarted.
Enjoy!
Notes
Note that you should be using apt for most things instead of apt-get, etc. apt replaces apt-get, apt search replaces apt-cache search, etc.
__
I do a weekly show called Unsupervised Learning, where I curate the most interesting stories in infosec, technology, and humans, and talk about why they matter. You can subscribe here.
Gentoo vs. Debian
The Ultimate Speed Guide for WordPress on NGINX
Building an IDS on CentOS using Suricata
The First 10 Things I Do on a New Mac
Ubuntu: aptitude > apt-*
Daniel Miessler's Blog
- Daniel Miessler's profile
- 18 followers

