It sounds like you were given a root shell. A root shell is typically indicated with a hash sign (#) as opposed to a user shell which is usually indicated with a dollar sign ($).
Whether or not there is a directory name or user name as well depends on the particular shell in use, as a root shell could look like any of the following:
#
/#
/dir#
username:/dir#
username@hostname:/dir#
The last of the above examples is the default prompt in Bash in Ubuntu. The first is the default in the dash shell. Try it with /bin/sh
. Of course this is configurable in both.
To open a root shell, the shortcut is:
sudo -i
This opens the root user's configured shell as a login shell, which will usually be bash. It's a shortcut to sudo su -
. If you want to open a different shell as root, without modifying the root user's configured shell, you can use the long-winded:
sudo su -s /bin/sh -
Replace /bin/sh with the shell you want to open.
#
instead of$
?