-bash: sudo: command not found
Clash Royale CLAN TAG#URR8PPP
up vote
30
down vote
favorite
I am trying to deploy django app.
When I print apt-get update
I see
W: Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (13: Permission denied)
W: Unable to read /etc/apt/sources.list.d/ - DirectoryExists (13: Permission denied)
W: Unable to read /etc/apt/sources.list - RealFileExists (13: Permission denied)
E: List directory /var/lib/apt/lists/partial is missing. - Acquire (13: Permission denied)
E: Unable to read /var/cache/apt/ - opendir (13: Permission denied)
E: Unable to read /var/cache/apt/ - opendir (13: Permission denied)
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?
When I print sudo apt-get update
I see
-bash: sudo: command not found
I tried to use su
instead of sudo
.
But it is strange.
For example I print su apt-get update
And nothing happens
I just see a new line,
(uiserver):u78600811:~$ su apt-get update
(uiserver):u78600811:~$
The same if I try to install some packages.
What do I do?
If it is useful info - I am using Debian
(uiserver):u87600811:~$ uname -a
Linux infong1559 3.14.0-ui16294-uiabi1-infong-amd64 #1 SMP Debian 3.14.79-2~ui80+4 (2016-10-20) x86_64 GNU/Linux
debian apt sudo su
add a comment |Â
up vote
30
down vote
favorite
I am trying to deploy django app.
When I print apt-get update
I see
W: Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (13: Permission denied)
W: Unable to read /etc/apt/sources.list.d/ - DirectoryExists (13: Permission denied)
W: Unable to read /etc/apt/sources.list - RealFileExists (13: Permission denied)
E: List directory /var/lib/apt/lists/partial is missing. - Acquire (13: Permission denied)
E: Unable to read /var/cache/apt/ - opendir (13: Permission denied)
E: Unable to read /var/cache/apt/ - opendir (13: Permission denied)
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?
When I print sudo apt-get update
I see
-bash: sudo: command not found
I tried to use su
instead of sudo
.
But it is strange.
For example I print su apt-get update
And nothing happens
I just see a new line,
(uiserver):u78600811:~$ su apt-get update
(uiserver):u78600811:~$
The same if I try to install some packages.
What do I do?
If it is useful info - I am using Debian
(uiserver):u87600811:~$ uname -a
Linux infong1559 3.14.0-ui16294-uiabi1-infong-amd64 #1 SMP Debian 3.14.79-2~ui80+4 (2016-10-20) x86_64 GNU/Linux
debian apt sudo su
Is this a customer account on a commercial server?
â Tomasz
Mar 30 '17 at 20:48
@tomas yeah////
â user2950593
Mar 30 '17 at 20:54
1
If you don't own the server, what made you think you have the right to install or remove software? ask the admin
â Shadur
Mar 31 '17 at 4:50
What happens if you runapt-cache policy sudo
? Not all Linux distros install sudo by default (Debian, for instance, will install sudo if and only if you don't specify a root password on installation). You can run apt-cache without root privileges.
â rosuav
Mar 31 '17 at 10:21
add a comment |Â
up vote
30
down vote
favorite
up vote
30
down vote
favorite
I am trying to deploy django app.
When I print apt-get update
I see
W: Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (13: Permission denied)
W: Unable to read /etc/apt/sources.list.d/ - DirectoryExists (13: Permission denied)
W: Unable to read /etc/apt/sources.list - RealFileExists (13: Permission denied)
E: List directory /var/lib/apt/lists/partial is missing. - Acquire (13: Permission denied)
E: Unable to read /var/cache/apt/ - opendir (13: Permission denied)
E: Unable to read /var/cache/apt/ - opendir (13: Permission denied)
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?
When I print sudo apt-get update
I see
-bash: sudo: command not found
I tried to use su
instead of sudo
.
But it is strange.
For example I print su apt-get update
And nothing happens
I just see a new line,
(uiserver):u78600811:~$ su apt-get update
(uiserver):u78600811:~$
The same if I try to install some packages.
What do I do?
If it is useful info - I am using Debian
(uiserver):u87600811:~$ uname -a
Linux infong1559 3.14.0-ui16294-uiabi1-infong-amd64 #1 SMP Debian 3.14.79-2~ui80+4 (2016-10-20) x86_64 GNU/Linux
debian apt sudo su
I am trying to deploy django app.
When I print apt-get update
I see
W: Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (13: Permission denied)
W: Unable to read /etc/apt/sources.list.d/ - DirectoryExists (13: Permission denied)
W: Unable to read /etc/apt/sources.list - RealFileExists (13: Permission denied)
E: List directory /var/lib/apt/lists/partial is missing. - Acquire (13: Permission denied)
E: Unable to read /var/cache/apt/ - opendir (13: Permission denied)
E: Unable to read /var/cache/apt/ - opendir (13: Permission denied)
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?
When I print sudo apt-get update
I see
-bash: sudo: command not found
I tried to use su
instead of sudo
.
But it is strange.
For example I print su apt-get update
And nothing happens
I just see a new line,
(uiserver):u78600811:~$ su apt-get update
(uiserver):u78600811:~$
The same if I try to install some packages.
What do I do?
If it is useful info - I am using Debian
(uiserver):u87600811:~$ uname -a
Linux infong1559 3.14.0-ui16294-uiabi1-infong-amd64 #1 SMP Debian 3.14.79-2~ui80+4 (2016-10-20) x86_64 GNU/Linux
debian apt sudo su
debian apt sudo su
edited Mar 30 '17 at 21:07
Tomasz
8,63052761
8,63052761
asked Mar 30 '17 at 20:18
user2950593
274149
274149
Is this a customer account on a commercial server?
â Tomasz
Mar 30 '17 at 20:48
@tomas yeah////
â user2950593
Mar 30 '17 at 20:54
1
If you don't own the server, what made you think you have the right to install or remove software? ask the admin
â Shadur
Mar 31 '17 at 4:50
What happens if you runapt-cache policy sudo
? Not all Linux distros install sudo by default (Debian, for instance, will install sudo if and only if you don't specify a root password on installation). You can run apt-cache without root privileges.
â rosuav
Mar 31 '17 at 10:21
add a comment |Â
Is this a customer account on a commercial server?
â Tomasz
Mar 30 '17 at 20:48
@tomas yeah////
â user2950593
Mar 30 '17 at 20:54
1
If you don't own the server, what made you think you have the right to install or remove software? ask the admin
â Shadur
Mar 31 '17 at 4:50
What happens if you runapt-cache policy sudo
? Not all Linux distros install sudo by default (Debian, for instance, will install sudo if and only if you don't specify a root password on installation). You can run apt-cache without root privileges.
â rosuav
Mar 31 '17 at 10:21
Is this a customer account on a commercial server?
â Tomasz
Mar 30 '17 at 20:48
Is this a customer account on a commercial server?
â Tomasz
Mar 30 '17 at 20:48
@tomas yeah////
â user2950593
Mar 30 '17 at 20:54
@tomas yeah////
â user2950593
Mar 30 '17 at 20:54
1
1
If you don't own the server, what made you think you have the right to install or remove software? ask the admin
â Shadur
Mar 31 '17 at 4:50
If you don't own the server, what made you think you have the right to install or remove software? ask the admin
â Shadur
Mar 31 '17 at 4:50
What happens if you run
apt-cache policy sudo
? Not all Linux distros install sudo by default (Debian, for instance, will install sudo if and only if you don't specify a root password on installation). You can run apt-cache without root privileges.â rosuav
Mar 31 '17 at 10:21
What happens if you run
apt-cache policy sudo
? Not all Linux distros install sudo by default (Debian, for instance, will install sudo if and only if you don't specify a root password on installation). You can run apt-cache without root privileges.â rosuav
Mar 31 '17 at 10:21
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
30
down vote
By default sudo is not installed on Debian, but you can install it. First enable su-mode:su -
Install sudo by running:apt-get install sudo -y
After that you would need to play around with users and permissions. Give sudo right to your own user.
usermod -aG sudo yourusername
Make sure your sudoers file have sudo group added. Run:visudo
to modify sudoers file
and add following line into it (if it is missing):
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
You need to relogin or reboot device completely for changes to take effect.
2
This should be accepted answer, this solved my problem
â Callat
Mar 18 at 18:19
add a comment |Â
up vote
15
down vote
Since it's a commercial server you won't have access to root account nor be able to operate with root privileges. This means you won't be able to run sudo
nor install packages. What you can try to do is:
Check if you have access to a compiler and compile what you want for yourself and in your home space.
Check if you can run a virtual machine. This might let you run your private instance of an OS, on which you would install packages.
add a comment |Â
up vote
8
down vote
su
and sudo
are two different, but related commands. It is unusual for sudo
not to be installed, but it may simply not be in your Path. Try /usr/bin/sudo command
.
If indeed sudo
is not available, you need as you surmised to use su
, but it does not work in the same way as sudo
. The simplest way to use it is to simply run:
su -
This will ask you for the root
user's password, at which point you should probably apt install sudo
, log out of the root shell, and then proceed as normal.
Mind that unlike sudo
, which asks you for your password, su
will ask you for root's password.
when I write su - nothing happens - just new line
â user2950593
Mar 30 '17 at 20:33
3
Then you're probably already root. Check withwhoami
. If you're root,apt install sudo
as described.
â DopeGhoti
Mar 30 '17 at 20:40
(uiserver):u78600811:~$ apt install sudo
â user2950593
Mar 30 '17 at 20:47
W: Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (13: Permission denied) 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?
â user2950593
Mar 30 '17 at 20:47
@user2950593 if you're root then the prompt string will be#
, not$
â phuclv
Mar 31 '17 at 4:56
 |Â
show 2 more comments
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
30
down vote
By default sudo is not installed on Debian, but you can install it. First enable su-mode:su -
Install sudo by running:apt-get install sudo -y
After that you would need to play around with users and permissions. Give sudo right to your own user.
usermod -aG sudo yourusername
Make sure your sudoers file have sudo group added. Run:visudo
to modify sudoers file
and add following line into it (if it is missing):
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
You need to relogin or reboot device completely for changes to take effect.
2
This should be accepted answer, this solved my problem
â Callat
Mar 18 at 18:19
add a comment |Â
up vote
30
down vote
By default sudo is not installed on Debian, but you can install it. First enable su-mode:su -
Install sudo by running:apt-get install sudo -y
After that you would need to play around with users and permissions. Give sudo right to your own user.
usermod -aG sudo yourusername
Make sure your sudoers file have sudo group added. Run:visudo
to modify sudoers file
and add following line into it (if it is missing):
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
You need to relogin or reboot device completely for changes to take effect.
2
This should be accepted answer, this solved my problem
â Callat
Mar 18 at 18:19
add a comment |Â
up vote
30
down vote
up vote
30
down vote
By default sudo is not installed on Debian, but you can install it. First enable su-mode:su -
Install sudo by running:apt-get install sudo -y
After that you would need to play around with users and permissions. Give sudo right to your own user.
usermod -aG sudo yourusername
Make sure your sudoers file have sudo group added. Run:visudo
to modify sudoers file
and add following line into it (if it is missing):
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
You need to relogin or reboot device completely for changes to take effect.
By default sudo is not installed on Debian, but you can install it. First enable su-mode:su -
Install sudo by running:apt-get install sudo -y
After that you would need to play around with users and permissions. Give sudo right to your own user.
usermod -aG sudo yourusername
Make sure your sudoers file have sudo group added. Run:visudo
to modify sudoers file
and add following line into it (if it is missing):
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
You need to relogin or reboot device completely for changes to take effect.
answered Feb 21 at 12:27
Maksim Luzik
415310
415310
2
This should be accepted answer, this solved my problem
â Callat
Mar 18 at 18:19
add a comment |Â
2
This should be accepted answer, this solved my problem
â Callat
Mar 18 at 18:19
2
2
This should be accepted answer, this solved my problem
â Callat
Mar 18 at 18:19
This should be accepted answer, this solved my problem
â Callat
Mar 18 at 18:19
add a comment |Â
up vote
15
down vote
Since it's a commercial server you won't have access to root account nor be able to operate with root privileges. This means you won't be able to run sudo
nor install packages. What you can try to do is:
Check if you have access to a compiler and compile what you want for yourself and in your home space.
Check if you can run a virtual machine. This might let you run your private instance of an OS, on which you would install packages.
add a comment |Â
up vote
15
down vote
Since it's a commercial server you won't have access to root account nor be able to operate with root privileges. This means you won't be able to run sudo
nor install packages. What you can try to do is:
Check if you have access to a compiler and compile what you want for yourself and in your home space.
Check if you can run a virtual machine. This might let you run your private instance of an OS, on which you would install packages.
add a comment |Â
up vote
15
down vote
up vote
15
down vote
Since it's a commercial server you won't have access to root account nor be able to operate with root privileges. This means you won't be able to run sudo
nor install packages. What you can try to do is:
Check if you have access to a compiler and compile what you want for yourself and in your home space.
Check if you can run a virtual machine. This might let you run your private instance of an OS, on which you would install packages.
Since it's a commercial server you won't have access to root account nor be able to operate with root privileges. This means you won't be able to run sudo
nor install packages. What you can try to do is:
Check if you have access to a compiler and compile what you want for yourself and in your home space.
Check if you can run a virtual machine. This might let you run your private instance of an OS, on which you would install packages.
answered Mar 30 '17 at 21:04
Tomasz
8,63052761
8,63052761
add a comment |Â
add a comment |Â
up vote
8
down vote
su
and sudo
are two different, but related commands. It is unusual for sudo
not to be installed, but it may simply not be in your Path. Try /usr/bin/sudo command
.
If indeed sudo
is not available, you need as you surmised to use su
, but it does not work in the same way as sudo
. The simplest way to use it is to simply run:
su -
This will ask you for the root
user's password, at which point you should probably apt install sudo
, log out of the root shell, and then proceed as normal.
Mind that unlike sudo
, which asks you for your password, su
will ask you for root's password.
when I write su - nothing happens - just new line
â user2950593
Mar 30 '17 at 20:33
3
Then you're probably already root. Check withwhoami
. If you're root,apt install sudo
as described.
â DopeGhoti
Mar 30 '17 at 20:40
(uiserver):u78600811:~$ apt install sudo
â user2950593
Mar 30 '17 at 20:47
W: Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (13: Permission denied) 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?
â user2950593
Mar 30 '17 at 20:47
@user2950593 if you're root then the prompt string will be#
, not$
â phuclv
Mar 31 '17 at 4:56
 |Â
show 2 more comments
up vote
8
down vote
su
and sudo
are two different, but related commands. It is unusual for sudo
not to be installed, but it may simply not be in your Path. Try /usr/bin/sudo command
.
If indeed sudo
is not available, you need as you surmised to use su
, but it does not work in the same way as sudo
. The simplest way to use it is to simply run:
su -
This will ask you for the root
user's password, at which point you should probably apt install sudo
, log out of the root shell, and then proceed as normal.
Mind that unlike sudo
, which asks you for your password, su
will ask you for root's password.
when I write su - nothing happens - just new line
â user2950593
Mar 30 '17 at 20:33
3
Then you're probably already root. Check withwhoami
. If you're root,apt install sudo
as described.
â DopeGhoti
Mar 30 '17 at 20:40
(uiserver):u78600811:~$ apt install sudo
â user2950593
Mar 30 '17 at 20:47
W: Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (13: Permission denied) 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?
â user2950593
Mar 30 '17 at 20:47
@user2950593 if you're root then the prompt string will be#
, not$
â phuclv
Mar 31 '17 at 4:56
 |Â
show 2 more comments
up vote
8
down vote
up vote
8
down vote
su
and sudo
are two different, but related commands. It is unusual for sudo
not to be installed, but it may simply not be in your Path. Try /usr/bin/sudo command
.
If indeed sudo
is not available, you need as you surmised to use su
, but it does not work in the same way as sudo
. The simplest way to use it is to simply run:
su -
This will ask you for the root
user's password, at which point you should probably apt install sudo
, log out of the root shell, and then proceed as normal.
Mind that unlike sudo
, which asks you for your password, su
will ask you for root's password.
su
and sudo
are two different, but related commands. It is unusual for sudo
not to be installed, but it may simply not be in your Path. Try /usr/bin/sudo command
.
If indeed sudo
is not available, you need as you surmised to use su
, but it does not work in the same way as sudo
. The simplest way to use it is to simply run:
su -
This will ask you for the root
user's password, at which point you should probably apt install sudo
, log out of the root shell, and then proceed as normal.
Mind that unlike sudo
, which asks you for your password, su
will ask you for root's password.
answered Mar 30 '17 at 20:28
DopeGhoti
42k55180
42k55180
when I write su - nothing happens - just new line
â user2950593
Mar 30 '17 at 20:33
3
Then you're probably already root. Check withwhoami
. If you're root,apt install sudo
as described.
â DopeGhoti
Mar 30 '17 at 20:40
(uiserver):u78600811:~$ apt install sudo
â user2950593
Mar 30 '17 at 20:47
W: Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (13: Permission denied) 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?
â user2950593
Mar 30 '17 at 20:47
@user2950593 if you're root then the prompt string will be#
, not$
â phuclv
Mar 31 '17 at 4:56
 |Â
show 2 more comments
when I write su - nothing happens - just new line
â user2950593
Mar 30 '17 at 20:33
3
Then you're probably already root. Check withwhoami
. If you're root,apt install sudo
as described.
â DopeGhoti
Mar 30 '17 at 20:40
(uiserver):u78600811:~$ apt install sudo
â user2950593
Mar 30 '17 at 20:47
W: Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (13: Permission denied) 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?
â user2950593
Mar 30 '17 at 20:47
@user2950593 if you're root then the prompt string will be#
, not$
â phuclv
Mar 31 '17 at 4:56
when I write su - nothing happens - just new line
â user2950593
Mar 30 '17 at 20:33
when I write su - nothing happens - just new line
â user2950593
Mar 30 '17 at 20:33
3
3
Then you're probably already root. Check with
whoami
. If you're root, apt install sudo
as described.â DopeGhoti
Mar 30 '17 at 20:40
Then you're probably already root. Check with
whoami
. If you're root, apt install sudo
as described.â DopeGhoti
Mar 30 '17 at 20:40
(uiserver):u78600811:~$ apt install sudo
â user2950593
Mar 30 '17 at 20:47
(uiserver):u78600811:~$ apt install sudo
â user2950593
Mar 30 '17 at 20:47
W: Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (13: Permission denied) 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?
â user2950593
Mar 30 '17 at 20:47
W: Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (13: Permission denied) 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?
â user2950593
Mar 30 '17 at 20:47
@user2950593 if you're root then the prompt string will be
#
, not $
â phuclv
Mar 31 '17 at 4:56
@user2950593 if you're root then the prompt string will be
#
, not $
â phuclv
Mar 31 '17 at 4:56
 |Â
show 2 more comments
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f354928%2fbash-sudo-command-not-found%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Is this a customer account on a commercial server?
â Tomasz
Mar 30 '17 at 20:48
@tomas yeah////
â user2950593
Mar 30 '17 at 20:54
1
If you don't own the server, what made you think you have the right to install or remove software? ask the admin
â Shadur
Mar 31 '17 at 4:50
What happens if you run
apt-cache policy sudo
? Not all Linux distros install sudo by default (Debian, for instance, will install sudo if and only if you don't specify a root password on installation). You can run apt-cache without root privileges.â rosuav
Mar 31 '17 at 10:21