Debian – ‘sudo’ is not installed, I can’t install it, and it asks if I am root

debianrootsoftware installationsudo

I just finished installing Debian 8 (Jessie) and tried to make a directory in lib/firmware, because there was a file missing (rtl8723befw.bin) in the installation, and it says

mkdir: cannot create directory `rtlwifi`: Permission denied

I tried putting sudo on the front, but then it returns:

bash: sudo: command not found

When trying to install sudo with apt-get install sudo or even apt-get update it returns:

E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

I am really at a loss of what to do. All the solutions that I seem to find for the latest error is to use sudo, but I don't even have that.

Best Answer

If you do not have sudo installed, you will need to actually become root. Use su - and provide the root user's password (not your password) when asked. Once you have become root, you can then apt-get install sudo, log out of the root shell, and actually use sudo as you are trying to, now that it will have been installed.

Related Question