2

I'm a newcomer to Ubuntu (and linux in general) and since I have a machine spare, I have Ubuntu Server (terminal only) installed on one of my machines. I've recently started playing around with my dotfiles, however it seems I've messed something up as changing directory to '~' no longer presents me with the expected user's home directory!

The .bashrc file that's in my dotfiles directory then points to a ".env" file at ~/bin/dotfiles/.env which contains the following:

export EDITOR="nano"
export PATH=$PATH:~/bin
export home="/home/joe/"
export dotfiles="/home/joe/bin/dotfiles"

Does anyone have any ideas to restore the tilde to my user's home location?

6
  • With what user your are trying to cd ~?
    – topless
    Apr 22, 2011 at 9:21
  • The only user on the machine ("joe") - it worked absolutely fine until I messed around wit the .bashrc file.
    – user14763
    Apr 22, 2011 at 9:25
  • If you put it back under joe's home does it works? I have the suspicion that configuration files for your profile and applications had to be under your home.
    – topless
    Apr 22, 2011 at 9:31
  • Put what back? I replaced the files - I can't put it back :P (I have a feeling that it was stored in that file though)
    – user14763
    Apr 22, 2011 at 9:32
  • You said you changed it to . ~/bin/dotfiles/.bashrc you can mv /home/joe/bin/dotfiles/.bashrc /home/joe/.bashrc
    – topless
    Apr 22, 2011 at 9:33

1 Answer 1

7

~ takes you to whatever the variable $HOME points to.

Therefore, run

echo $HOME

to see the value of $HOME. Then find where $HOME is set to that inappropriate directory and fix it.

0

You must log in to answer this question.