Search code examples
linuxdebiansudo

bash: sudo: command not found on debian jessie


I recently installed Debian 8 on my laptop, and when I tried to use "sudo" it responded with

bash: sudo: command not found`

Then I ran the following command

/usr/bin/sudo

I got the following error

bash: /usr/bin/sudo: No such file or directory

After that when I tried to install it with apt-get I got this

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  sudo
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/850 kB of archives.
After this operation, 2,694 kB of additional disk space will be used.
Media change: please insert the disc labeled
 'Debian GNU/Linux 8.0.0 _Jessie_ - Official amd64 CD Binary-1 20150425-12:54'
in the drive '/media/cdrom/' and press enter

Solution

  • I fixed the issue! The file source.list in /etc/apt/source.list was empty! If you have the same problem, go to the link below and find your country, then copy the links to source.list or search Debian source list generator debian.org/mirror/list-full