Terminal

Rashkae ubuntu at tigershaunt.com
Fri May 15 15:08:40 UTC 2009


sg1 wrote:
> Hi 
> 
> Moving from director to directory I am using cd ~/name of director the
> terminal is not recognising  the "~" for some reason.'
> 
> sg1 at sg1-desktop:~$ sudo su
> root at sg1-desktop:/home/sg1# cd ~/Desktop
> bash: cd: /root/Desktop: No such file or directory
> root at sg1-desktop:/home/sg1# 
> 
> For example trying to move from sg1 to desktop and back again, no luck
> so far.
> 
>

Errr, well yeah, that's obvious.  By using sudo su, you are changing
your effective user to root.  Root's default home directory is /root

sudo su -p or sudo -s might behave more as you were expecting, but I
think you should give careful consideration to where/when you give
yourself a shell prompt with root privileges.  Meaning no offense, but I
suspect you lack the experience to not cause your system great harm...
(though if there's nothing to loose, learning opportunities abound)




More information about the ubuntu-users mailing list