Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ubuntu 12.04 LTS bash: sudo: command not found [closed]

I am new to Linux terminal, now I tried to use sudo, apt-get, whereis etc., commands in linux it returns an error bash: sudo: command not found

my command

 $sudo apt-get install libc6-dev

Error is

 bash: sudo: command not found.

Please let me know what could be the issue here, thank you in advance

like image 626
user1845827 Avatar asked Mar 24 '13 07:03

user1845827


People also ask

How do I fix sudo command not found?

How to Fix "sudo: command not found" on Linux. As your user cannot assume the privileges of the root user without already having sudo installed, you need to log out of your user account and log in as root. As root, you can install the sudo package with the privileges this account possesses.

Why sudo command not found in Linux?

The “command not found” error can occur if we have set a custom $PATH to run our scripts. This is because sudo might execute commands with a fresh environment instead of inheriting modified environment variables.


1 Answers

Try to login with su

$ su -

and install sudo

# apt-get install sudo
like image 136
Ajouve Avatar answered Sep 23 '22 16:09

Ajouve