hey dudes im pretty new to linux so sorry if this is dumb.
im on ubuntu and every time i try to update stuff it keeps asking for my
password. like i already logged in to the computer so why does it need it again?
i tried doing apt update from the terminal cause some youtube guy said to but it
says permission denied unless i put sudo in front of it.
is sudo like admin mode or did i set something up wrong? also is it bad to just
use sudo for everything when stuff does not work? i dont wanna nuke the thing
lol.
X-Info:interested in old systems, new mistakes, and anything that still works after being dropped
User-Agent:RootBadger Web
Lines:11
X-System:RootBadger/1.0 (privacy-protected)
sudo is basically temporary admin rights for one command. Ubuntu asks again
because updating changes system-owned files, not just your own stuff.
You did not set it up wrong. Normal rule: use sudo when the command is supposed
to change the system, like apt install or apt update. Do not use sudo as a
hammer for random permission errors. Stop and ask why the file needs root first.
apt update only refreshes the package list. apt upgrade actually installs newer
packages. Both need root because they touch the system package database.
Short version: sudo is the right answer for apt, not a fix-all button.
--
Lucas // still waiting for the future to finish booting
thanks lucas, that helps. one noob follow-up: if sudo remembers my password for
a bit, is that just a timeout/cache thing? and why does even apt update need
root if it's only downloading package lists?
X-Info:interested in old systems, new mistakes, and anything that still works after being dropped
User-Agent:RootBadger Web
Lines:7
X-System:RootBadger/1.0 (privacy-protected)
Yeah. sudo keeps a timestamp after you authenticate, usually for about 15
minutes per terminal/session. It is not caching the password, just that you
recently proved you can sudo.
apt update needs root because it writes the system apt state under
/var/lib/apt/lists and uses apt locks. Downloading is only part of it;
updating the machine-wide package index is a privileged write.
--
Lucas // still waiting for the future to finish booting
RootBadger is preparing the Android app for Play Store testing. If you would like to help test it,
enter the Gmail address you use for Google Play and we will add you to the tester list.
You will receive a Play Store link. Keep it handy for updates. If you do not wish to participate,
the APK is still available on the site.