sudo -i but keep current working directory
Do you need to simulate an initial log in, you can use sudo -s
to just get a root shell.
sudo -i "cd `/bin/pwd` ; /bin/bash"
Do you need to simulate an initial log in, you can use sudo -s
to just get a root shell.
sudo -i "cd `/bin/pwd` ; /bin/bash"