[英]Difference between `sudo su` and `sudo fish`
I am running fish (Friendly Interactive Shell) as my standard terminal in Ubuntu 14.04, rather than bash. 我在Ubuntu 14.04中将fish(Friendly Interactive Shell)作为标准终端运行,而不是bash。
I noticed the following behaviour and don't know, if any of these are the preferred one to gain root access. 我注意到以下行为,并且不知道这些行为是否是获得root访问权限的首选。
I can type the command sudo su
or sudo fish
and it will both give me super user rights.(The prompt is displayed as root@ubuntu ~#
) 我可以输入命令
sudo su
或sudo fish
,它们都将赋予我超级用户权限。(提示符显示为root@ubuntu ~#
)
Is there any difference in the behaviour of these commands? 这些命令的行为是否有所不同?
The only thing I could understand is, that sudo su
uses the fish configuration located in /root/.config/fish/
and sudo fish
uses the fish configuration in my home directory /home/uloco/.config/fish
. 我唯一能理解的是,
sudo su
使用位于/root/.config/fish/
的fish配置,而sudo fish
使用位于我的主目录/home/uloco/.config/fish
的fish配置。
Is there a possibility to crypt my system by using sudo fish
? 有可能通过使用
sudo fish
来加密我的系统吗? Will there be any owner changes made to files in my home directory if I use this? 如果使用此功能,是否会对我的主目录中的文件进行任何所有者更改?
When you execute sudo fish, then the application fish (the shell) is executable as if you were the root user, but within the environment of the calling user. 当执行sudo fish时,应用程序fish(shell)就可以像您是root用户一样执行,但是在调用用户的环境中。 Thats why fishs rc-scripts are executed.
这就是为什么执行鱼rc脚本的原因。
Which one you should use depends on you: 您应该使用哪一个取决于您:
Is there a possibility to crypt my system by using sudo fish? 有可能通过使用sudo fish来加密我的系统吗?
Its just the environment, you don't crypt anything. 它只是环境,您无需加密任何内容。
Will there be any owner changes made to files in my home directory if I use this? 如果使用此功能,是否会对我的主目录中的文件进行任何所有者更改?
Not if you don't change something manually. 如果您不手动更改,则不会。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.