6 ms·
Only one of them requires readwrite system administrator privileges (eg sudo). apt-cache can be run by any user as it doesn't expose any secret data and can't b
by adricnet 11y ago
Only one of them requires readwrite system administrator privileges (eg sudo). apt-cache can be run by any user as it doesn't expose any secret data and can't be used to make changes. apt-get can install and uninstall software as well as download packages and thus needs root privileges in the classic UNIX model.
- pherq 11y agoapt-get source works fine without super-user privileges, so it isn't just that some have to be run as root.
- CydeWeys 11y agoapt-get doesn't fail when run as non-root, it only fails when you run it as non-root when you try to some of the commands that require root privileges (such as installing system level packages). It has lots of commands that don't need root privileges. I don't see much reason why "list all the packages available for installation", as well as the other commands in apt-cache, aren't included in that list.
- krylon 11y agoOn CentOS, I can do "yum search something" as a regular user, while "yum install something" or "yum upgrade" require root privileges. I think it's similar with the pkg command on FreeBSD.
- konfou 11y agoand same with pacman on Arch (and derivatives)
- deleted 11y ago[deleted]