VirtualBox Ubuntu32 v14.04 未找到 sudo 命令

VirtualBox Ubuntu32 v14.04 未找到 sudo 命令

这是一个奇怪的问题,“sudo su”可以运行但“sudo mount...”无法运行。

我的环境是安装在Windows 10中的VirtualBox Ubuntu 32位14.04,我想在Ubuntu和Windows之间共享一个文件夹,以便文件可以轻松地相互复制。

下面的命令如果运行成功,文件夹就可以正常共享了。有时它会成功(不幸的是我不记得是怎么做的),但大多数时候启动 VB Ubuntu 后,打开终端运行命令,得到以下结果:

pis@pis-VirtualBox:~$ sudo mount -t vboxsf SharedVM Downloads
No command 'sudo' found, did you mean:
 Command 'sudo' from package 'sudo-ldap' (universe)
 Command 'sudo' from package 'sudo' (main)
sudo: command not found

pis@pis-VirtualBox:~$ type -p sudo
/usr/bin/sudo

pis@pis-VirtualBox:~$ sudo su
[sudo] password for pis: 

root@pis-VirtualBox:/home/pis# sudo mount -t vboxsf SharedVM Downloads
No command 'sudo' found, did you mean:
 Command 'sudo' from package 'sudo' (main)
 Command 'sudo' from package 'sudo-ldap' (universe)
sudo: command not found

root@pis-VirtualBox:/home/pis# apt-get install sudo
Reading package lists... Done
Building dependency tree       
Reading state information... Done
sudo is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 61 not upgraded.

root@pis-VirtualBox:/home/pis# sudo mount -t vboxsf SharedVM Downloads
No command 'sudo' found, did you mean:
 Command 'sudo' from package 'sudo-ldap' (universe)
 Command 'sudo' from package 'sudo' (main)
sudo: command not found

root@pis-VirtualBox:/home/pis# echo ${PATH}
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

root@pis-VirtualBox:/home/pis# sudo mount -t vboxsf SharedVM Downloads
No command 'sudo' found, did you mean:
 Command 'sudo' from package 'sudo-ldap' (universe)
 Command 'sudo' from package 'sudo' (main)
sudo: command not found

root@pis-VirtualBox:/home/pis# type -p sudo
/usr/bin/sudo

root@pis-VirtualBox:/home/pis# /usr/bin/sudo mount -t vboxsf SharedVM Downloads  
bash: /usr/bin/sudo: No such file or directory

任何人都可以建议如何解决它?或者需要更多信息?

答案1

解决方案:“sudo su”之后,只需运行不带“sudo”的命令

相关内容