1 of 5
http://jesin.tk/change-home-directory-in-linux/
Jesin's Blog
Home
Categories
WordPress Plugins
Contact Me
Home
Linux
Privacy Policy
Toolbox
About Me
Sitemap
Search
directory of a
Linux user with a
simple usermod
command. While
creating a user if
you didnt specify
any home
parameter Linux
assumes the
home directory of
bs
cri
be
the user to be
/home/username
even if you did specify you can later change it to
something else according to your needs. Apart from
changing the home directory using the usermod
command youll have to assign proper ownership and
permissions to the new folder. You can also change
the home directory by editing the /etc/passwd file. Ill
outline both the steps here.
22-May-14 6:21 PM
2 of 5
http://jesin.tk/change-home-directory-in-linux/
Find us on Facebook
Jesin's Blog
Like
Tools
username:x:500:500::/home/username:/bin/bash
change it to
Online
username:x:500:500::/home/new_home_directory:/bin/bash
htpasswd Generator
Save the file.
Finally copy all the old content to the new home
Tool Online
HTTP Headers Lookup
Tool
22-May-14 6:21 PM
3 of 5
http://jesin.tk/change-home-directory-in-linux/
directory
cp -f /home/username/* /home/new_home_dir/
Like
Command to Display
Directory Sizes in
Tweet
Tool
Related Posts:
Change Registered To
in Windows
22-May-14 6:21 PM
4 of 5
http://jesin.tk/change-home-directory-in-linux/
Name (Required)
Website (Optional)
Comment
22-May-14 6:21 PM
5 of 5
http://jesin.tk/change-home-directory-in-linux/
Nav
Lets Socialize
Home
About Me
Contact Me
Privacy Policy
Sitemap
22-May-14 6:21 PM