1

I am a newbie in linux administration. I have always performed "sudo apt update" followed by "sudo apt upgrade -y" after creating a fresh Ubuntu instance (mostly I am using AWS EC2 instances). However, I cannot recall, for the life of me, if it is really necessary or part of what we call "best practice" when administering linux servers. Please let me know if it's best practice and whether I should continue on this "habit" of mine.

  • I would always sudo apt update as it allows me to validate the system is what I expect it is, and various issues don't exist. I wouldn't use the -y when you don't know what the results will be & would more likely full-upgrade to ensure all packages get installed rather than leaving some for later - but your packages installed/system will dictate what's best for you. – guiverc Sep 17 '21 at 07:19
  • Thanks @guiverc! I'll take note of the full-upgrade instead of using apt upgrade -y. – zzz.rivera24 Sep 17 '21 at 09:16
  • hi @N0rbert this helps a lot by providing detailed explanation of the commands. Thank you! – zzz.rivera24 Sep 17 '21 at 09:18

1 Answers1

3

It's a good practice to keep your software updated in order to install all security related updates especially after a new installation of Ubuntu when many new updates are usually available. Installing all security updates is particularly important if your Ubuntu OS is a server.

It's also a good idea to run sudo apt update before running apt commands that would install a large number of packages.

karel
  • 114,770