Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 01-26-2006, 04:03 PM   #1
Registered: Mar 2005
Location: Sweden
Distribution: Suse
Posts: 39

Rep: Reputation: 15
symlink home-directory?

I have 2 harddrives in my computer. One with the dist, and one with movies, mp3, projects and so on.

My username is steqve and I'd like to put my home-dir on the multimedia-disk.

So when I install a new dist, I can format the 1:st hdd, and still have all important data on disk 2. When I have installed a new dist, I insert disk 2 and symlink to the "home" directory there.

Can i symlink /home/steqve to /multimedia/home/steqve without any problems?
Old 01-26-2006, 04:40 PM   #2
Registered: Nov 2004
Location: UK
Distribution: Mandriva 2010.1
Posts: 128

Rep: Reputation: 15
Mot too sure about the answer to your question, but I use mandrake and in kcontrol then paths these is an option to change the paths of certain locations and your home directory is one of them. I assume suse is similar. If not someone here must know the file to edit to do the same thing but I'm afraid I don't. Would this not do what you want to?

Last edited by Richie55; 01-26-2006 at 04:44 PM.
Old 01-26-2006, 04:42 PM   #3
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,125

Rep: Reputation: 165Reputation: 165
From memory, the HOME variable is populated from /etc/passwd. You could try just changing the entry in /etc/passwd if you wanted to manually move the files over. Alternatively, you could use:

usermod -d /multimedia/home/steqve -m steqve
This would move the files from their existing location to the new one.

I haven't tried this, but the following is from the man page for usermod (on Slackware 10.2):

usermod - Modify a user account

usermod [-c comment] [-d home_dir [-m]]
[-e expire_date] [-f inactive_time]
[-g initial_group] [-G group [,...]]
[-l login_name] [-p passwd]
[-s shell] [-u uid [-o]] [-L|-U] login

The usermod command modifies the system account files to reflect the changes that are speci-
fied on the command line. The options which apply to the usermod command are:


-d home_dir
The user's new login directory. If the -m option is given the contents of the cur-
rent home directory will be moved to the new home directory, which is created if it
does not already exist.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache Root/Home Directory and setting up FTP for home directories? Mankind75 Linux - Newbie 6 07-23-2006 02:37 PM
how to remove a symlink without deleting the destination directory Snerkel Linux - Software 3 01-20-2005 11:47 AM
symlink multiple files to new directory with new extension jmanjohn61 Linux - General 1 01-06-2005 12:55 PM
moving a symlink in a directory e1000 Linux - General 2 02-23-2004 05:09 PM
home directory TX_metalhead Linux - General 6 06-02-2002 01:41 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:55 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration