What’s the recommended way to install packages on a fresh Debian system?

August 8, 2026 3 answers
Asked by ~friday shift 14
I've just installed the latest Debian release with KDE and want to start installing software, beginning with Podman. I created both a root account and a regular user account, then logged into KDE with the regular account. I expected to use sudo for administrative commands, but running `sudo apt-get -y install podman` reports that my user is not in the sudoers file. Why wasn't my account given sudo access, and what is the proper Debian workflow for installing packages? Should I switch to root, configure sudo, or use another approach? Also, is it okay to use `apt-get` as shown in Podman's documentation, or should I use `apt` instead?

Answers

receipt__drawer
Another option is to keep using `su` for administrative commands instead of setting up sudo. However, sudo is usually more convenient and records which regular user performed each administrative action. Debian’s installer commonly grants sudo access automatically only when no root password is configured; explicitly creating a root password can result in the regular user not being added to the sudo group.
Reply to this answer
plus.two.minutes
If you set a root password during installation, Debian may leave your regular account without sudo access. You can switch to root with `su`, install sudo if necessary, and add your user to the `sudo` group. After logging out and back in, `sudo apt-get install podman` should work. Using root for this one-time setup is normal; you don’t need to run your desktop session as root.

~friday shift 14: That makes sense. I’ll use `su` to configure sudo rather than logging into the graphical desktop as root.

Reply to this answer
left.turn.ahead
Debian supports both commands. `apt` is generally nicer for interactive terminal use, while `apt-get` remains supported and is often preferred in scripts or documentation because its behavior and output are more stable. The Podman command using `apt-get` is fine; the important part is having administrative privileges. You may want to omit `-y` the first time so you can review what will be installed.

lichenometry: Right—`apt-get` hasn’t been deprecated. `apt` is a more user-friendly, higher-level interface intended mainly for interactive use.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions