In Ubuntu 13.10, for the default setting, the following command in
user@host:~/path$ sudo su
results in entering an prompt
And this command
user@host:~/path$ sudo bash
Is this means a different between those two commands to be that
~ have different meaning?
Usually I use
sudo only. But sometimes it is not enough. For example if I wanted to write a command that modifies some file with
cat >> file <<EOF, and the file is only writeable for
root, I have to either use
sudo su or
bash is your preferred shell). But the above example seems to show that use
sudo bash is better because the operation environment is more like the previous one. Is this the case? What else are different between those commands?