Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I was trying to install sudo on my VM and when i used the code
Code:
apt install sudo
the output was this:
E: Sub-process /usr/bin/dpkg returned an error code (2), can someone tell me how to fix this?
I was using debian 9 and im already root
sudo is already installed BY DEFAULT and should be configured by default ( at time of the OS install
or you have set a "ROOT" password at time of install and are not using sudo but using " su - "
I already checked and it is not installed I don't know why, I'm a high school student and i'm doing this for a project, i'm not very experienced with Linux
//sorry for the bad English it is not my native language //
I was trying to install sudo on my VM and when i used the code
Code:
apt install sudo
the output was this:
E: Sub-process /usr/bin/dpkg returned an error code (2), can someone tell me how to fix this?
I was using debian 9 and im already root
is that all the output you get?
please show us the complete output.
how did you install debian?
did you do something to it subsequently?
In my experience, only Ubuntu and its derivatives configure sudo by default. Every other distro I've used, including Debian, expects you to configure a root password at either install or first boot and use su to perform administrative tasks.
Debian includes sudo by default, but does not configure it. I checked my Debian box just to be certain. This, by the way, is the common practice outside of the *buntuverse.
As far as I can remember, Debian has a "sudo" group, which is set in sudoers to have full sudo rights. If you add yourself to this group, you should be able to use sudo.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.