Find the answer to your Linux question:
Results 1 to 6 of 6
Hey all, When I start up the terminal in Ubuntu, the default directory is in my /home/ folder. Is there a way to change the default directory to something else? ...
  1. #1
    Just Joined!
    Join Date
    May 2009
    Posts
    32

    Ubuntu Terminal

    Hey all,

    When I start up the terminal in Ubuntu, the default directory is in my /home/ folder. Is there a way to change the default directory to something else? I have another data partition. I'd like to have the Terminal's default directory start in a folder on my other partition rather than in /home.

    Is this possible?

    Thank you

  2. #2
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,422
    Yes, there are numberous ways.
    Do you want any terminal to start there when you launch it for that user? Or just the ubuntu terminal?
    You can also mount the data partiotion in the ~/MyData folder or over ~ or just point your /home to that.

    What would you like most.?

    Cheers,
    Robin
    New Users, please read this..
    Google first, then ask..

  3. #3
    Linux Newbie egan's Avatar
    Join Date
    Feb 2009
    Location
    Mountain View, CA
    Posts
    132
    Or you could add a cd to your .bashrc. E.g. if you want to be in /media/data
    Then you could add:
    cd /media/data
    To your .bashrc. Note that typing cd with no arguments into the terminal will result in puting you in your home directory rather than the directory the terminal starts out in.

  4. #4
    Just Joined!
    Join Date
    May 2009
    Posts
    32
    I would like for the Terminal on my main account to start at /media/disk/ rather than /home. I have a separate data partition and would like my Terminal to start there, instead.

    Could someone walk me through how to do this? I'm not sure how to access .bashrc or "add a cd" to something.

    Thanks

  5. #5
    Trusted Penguin elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    2,298
    Click Places -> Home Folder to open nautilus
    Press Ctrl + h to show hidden files
    Locate the file .bashrc
    Right click and select Open in Text Editor
    Right at the bottom add "cd /media/disk" (without the quotes)
    Save the file
    Open a terminal and see where it starts at.
    If it is OK, press Ctrl + h to hide the hidden files.
    If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)


    My new blog. It's probably not as good as I think it is.

  6. #6
    Just Joined!
    Join Date
    May 2009
    Posts
    32
    Works like a charm. Thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...