how to move home in ubuntu
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
1
down vote
favorite
I got a Ubuntu 15 VM and I am adding a second virtual disk for the home partition.
I moved the old home to home.old. and have mounted the new home on the new disk. and the mount is successful. But when I go see home, I don't see the directory for my test user. the directory for test is still under home.old.
I also tried to create a new test user, test2 but neither home nor home.old shows me the directory test2.
test2@test-virtual-machine:/$ cd /home
test2@test-virtual-machine:/home$ ls
lost+found
test2@test-virtual-machine:/home$ cd ..
test2@test-virtual-machine:/$ ls /home.old/
test
test2@test-virtual-machine:/$
What's going on here?
Thanks
EDIT:
as per request
test@test-virtual-machine:/home$ cd ~
bash: cd: /home/test: No such file or directory
test@test-virtual-machine:/home$ pwd
/home
test@test-virtual-machine:/home$ ls
aquota.user lost+found
test@test-virtual-machine:/home$
partitioning mount users home-directory
 |Â
show 7 more comments
up vote
1
down vote
favorite
I got a Ubuntu 15 VM and I am adding a second virtual disk for the home partition.
I moved the old home to home.old. and have mounted the new home on the new disk. and the mount is successful. But when I go see home, I don't see the directory for my test user. the directory for test is still under home.old.
I also tried to create a new test user, test2 but neither home nor home.old shows me the directory test2.
test2@test-virtual-machine:/$ cd /home
test2@test-virtual-machine:/home$ ls
lost+found
test2@test-virtual-machine:/home$ cd ..
test2@test-virtual-machine:/$ ls /home.old/
test
test2@test-virtual-machine:/$
What's going on here?
Thanks
EDIT:
as per request
test@test-virtual-machine:/home$ cd ~
bash: cd: /home/test: No such file or directory
test@test-virtual-machine:/home$ pwd
/home
test@test-virtual-machine:/home$ ls
aquota.user lost+found
test@test-virtual-machine:/home$
partitioning mount users home-directory
1
Run 'cd ~; pwd; ls' and tell me the results please
â Grammargeek
Jun 17 '15 at 2:49
hi, the results are posted to the question
â D.Zou
Jun 17 '15 at 3:18
Hmm weird but I meant as test2
â Grammargeek
Jun 17 '15 at 3:23
still the same result:bash: cd: /home/test2: No such file or directory
â D.Zou
Jun 17 '15 at 3:28
What happens if you run 'mkdir /home/test'?
â Grammargeek
Jun 17 '15 at 3:30
 |Â
show 7 more comments
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I got a Ubuntu 15 VM and I am adding a second virtual disk for the home partition.
I moved the old home to home.old. and have mounted the new home on the new disk. and the mount is successful. But when I go see home, I don't see the directory for my test user. the directory for test is still under home.old.
I also tried to create a new test user, test2 but neither home nor home.old shows me the directory test2.
test2@test-virtual-machine:/$ cd /home
test2@test-virtual-machine:/home$ ls
lost+found
test2@test-virtual-machine:/home$ cd ..
test2@test-virtual-machine:/$ ls /home.old/
test
test2@test-virtual-machine:/$
What's going on here?
Thanks
EDIT:
as per request
test@test-virtual-machine:/home$ cd ~
bash: cd: /home/test: No such file or directory
test@test-virtual-machine:/home$ pwd
/home
test@test-virtual-machine:/home$ ls
aquota.user lost+found
test@test-virtual-machine:/home$
partitioning mount users home-directory
I got a Ubuntu 15 VM and I am adding a second virtual disk for the home partition.
I moved the old home to home.old. and have mounted the new home on the new disk. and the mount is successful. But when I go see home, I don't see the directory for my test user. the directory for test is still under home.old.
I also tried to create a new test user, test2 but neither home nor home.old shows me the directory test2.
test2@test-virtual-machine:/$ cd /home
test2@test-virtual-machine:/home$ ls
lost+found
test2@test-virtual-machine:/home$ cd ..
test2@test-virtual-machine:/$ ls /home.old/
test
test2@test-virtual-machine:/$
What's going on here?
Thanks
EDIT:
as per request
test@test-virtual-machine:/home$ cd ~
bash: cd: /home/test: No such file or directory
test@test-virtual-machine:/home$ pwd
/home
test@test-virtual-machine:/home$ ls
aquota.user lost+found
test@test-virtual-machine:/home$
partitioning mount users home-directory
edited Jun 17 '15 at 3:17
asked Jun 17 '15 at 2:40
D.Zou
7532815
7532815
1
Run 'cd ~; pwd; ls' and tell me the results please
â Grammargeek
Jun 17 '15 at 2:49
hi, the results are posted to the question
â D.Zou
Jun 17 '15 at 3:18
Hmm weird but I meant as test2
â Grammargeek
Jun 17 '15 at 3:23
still the same result:bash: cd: /home/test2: No such file or directory
â D.Zou
Jun 17 '15 at 3:28
What happens if you run 'mkdir /home/test'?
â Grammargeek
Jun 17 '15 at 3:30
 |Â
show 7 more comments
1
Run 'cd ~; pwd; ls' and tell me the results please
â Grammargeek
Jun 17 '15 at 2:49
hi, the results are posted to the question
â D.Zou
Jun 17 '15 at 3:18
Hmm weird but I meant as test2
â Grammargeek
Jun 17 '15 at 3:23
still the same result:bash: cd: /home/test2: No such file or directory
â D.Zou
Jun 17 '15 at 3:28
What happens if you run 'mkdir /home/test'?
â Grammargeek
Jun 17 '15 at 3:30
1
1
Run 'cd ~; pwd; ls' and tell me the results please
â Grammargeek
Jun 17 '15 at 2:49
Run 'cd ~; pwd; ls' and tell me the results please
â Grammargeek
Jun 17 '15 at 2:49
hi, the results are posted to the question
â D.Zou
Jun 17 '15 at 3:18
hi, the results are posted to the question
â D.Zou
Jun 17 '15 at 3:18
Hmm weird but I meant as test2
â Grammargeek
Jun 17 '15 at 3:23
Hmm weird but I meant as test2
â Grammargeek
Jun 17 '15 at 3:23
still the same result:
bash: cd: /home/test2: No such file or directory
â D.Zou
Jun 17 '15 at 3:28
still the same result:
bash: cd: /home/test2: No such file or directory
â D.Zou
Jun 17 '15 at 3:28
What happens if you run 'mkdir /home/test'?
â Grammargeek
Jun 17 '15 at 3:30
What happens if you run 'mkdir /home/test'?
â Grammargeek
Jun 17 '15 at 3:30
 |Â
show 7 more comments
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
Try the following:
sudo cp -pR /home.old/test /home
cd
ll
Make sure the files listed (except for ..
) all have your user name. For example:
drwx------ 3 yourusername yourusername 4096 Jan 1 1970 .gnome/
It's a bit confusing, but to add a new user, don't use useradd
. man useradd
says:
useradd is a low level utility for adding users. On Debian, administrators should usually use adduser(8) instead.
Instead, first remove the user you created with useradd
by using deluser
:
sudo deluser --remove-home test2
Then, add a user with adduser
:
sudo adduser test2
Follow the prompts, and you'll have a new user properly created.
it works, but how come the new user's directory aren't created or placed under the new home?
â D.Zou
Jun 17 '15 at 3:33
How did you add the user?
â Olathe
Jun 17 '15 at 3:35
useradd then set password
â D.Zou
Jun 17 '15 at 3:38
OK, I've added a section about that.
â Olathe
Jun 17 '15 at 3:42
@Grammargeek,..
in that directory listing is/home
, which is owned byroot
. However,.
in that directory listing is/home/test
, which should be owned bytest
.
â Olathe
Jun 17 '15 at 3:54
 |Â
show 2 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
Try the following:
sudo cp -pR /home.old/test /home
cd
ll
Make sure the files listed (except for ..
) all have your user name. For example:
drwx------ 3 yourusername yourusername 4096 Jan 1 1970 .gnome/
It's a bit confusing, but to add a new user, don't use useradd
. man useradd
says:
useradd is a low level utility for adding users. On Debian, administrators should usually use adduser(8) instead.
Instead, first remove the user you created with useradd
by using deluser
:
sudo deluser --remove-home test2
Then, add a user with adduser
:
sudo adduser test2
Follow the prompts, and you'll have a new user properly created.
it works, but how come the new user's directory aren't created or placed under the new home?
â D.Zou
Jun 17 '15 at 3:33
How did you add the user?
â Olathe
Jun 17 '15 at 3:35
useradd then set password
â D.Zou
Jun 17 '15 at 3:38
OK, I've added a section about that.
â Olathe
Jun 17 '15 at 3:42
@Grammargeek,..
in that directory listing is/home
, which is owned byroot
. However,.
in that directory listing is/home/test
, which should be owned bytest
.
â Olathe
Jun 17 '15 at 3:54
 |Â
show 2 more comments
up vote
0
down vote
accepted
Try the following:
sudo cp -pR /home.old/test /home
cd
ll
Make sure the files listed (except for ..
) all have your user name. For example:
drwx------ 3 yourusername yourusername 4096 Jan 1 1970 .gnome/
It's a bit confusing, but to add a new user, don't use useradd
. man useradd
says:
useradd is a low level utility for adding users. On Debian, administrators should usually use adduser(8) instead.
Instead, first remove the user you created with useradd
by using deluser
:
sudo deluser --remove-home test2
Then, add a user with adduser
:
sudo adduser test2
Follow the prompts, and you'll have a new user properly created.
it works, but how come the new user's directory aren't created or placed under the new home?
â D.Zou
Jun 17 '15 at 3:33
How did you add the user?
â Olathe
Jun 17 '15 at 3:35
useradd then set password
â D.Zou
Jun 17 '15 at 3:38
OK, I've added a section about that.
â Olathe
Jun 17 '15 at 3:42
@Grammargeek,..
in that directory listing is/home
, which is owned byroot
. However,.
in that directory listing is/home/test
, which should be owned bytest
.
â Olathe
Jun 17 '15 at 3:54
 |Â
show 2 more comments
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Try the following:
sudo cp -pR /home.old/test /home
cd
ll
Make sure the files listed (except for ..
) all have your user name. For example:
drwx------ 3 yourusername yourusername 4096 Jan 1 1970 .gnome/
It's a bit confusing, but to add a new user, don't use useradd
. man useradd
says:
useradd is a low level utility for adding users. On Debian, administrators should usually use adduser(8) instead.
Instead, first remove the user you created with useradd
by using deluser
:
sudo deluser --remove-home test2
Then, add a user with adduser
:
sudo adduser test2
Follow the prompts, and you'll have a new user properly created.
Try the following:
sudo cp -pR /home.old/test /home
cd
ll
Make sure the files listed (except for ..
) all have your user name. For example:
drwx------ 3 yourusername yourusername 4096 Jan 1 1970 .gnome/
It's a bit confusing, but to add a new user, don't use useradd
. man useradd
says:
useradd is a low level utility for adding users. On Debian, administrators should usually use adduser(8) instead.
Instead, first remove the user you created with useradd
by using deluser
:
sudo deluser --remove-home test2
Then, add a user with adduser
:
sudo adduser test2
Follow the prompts, and you'll have a new user properly created.
edited Jun 17 '15 at 3:42
answered Jun 17 '15 at 3:28
Olathe
2,13811221
2,13811221
it works, but how come the new user's directory aren't created or placed under the new home?
â D.Zou
Jun 17 '15 at 3:33
How did you add the user?
â Olathe
Jun 17 '15 at 3:35
useradd then set password
â D.Zou
Jun 17 '15 at 3:38
OK, I've added a section about that.
â Olathe
Jun 17 '15 at 3:42
@Grammargeek,..
in that directory listing is/home
, which is owned byroot
. However,.
in that directory listing is/home/test
, which should be owned bytest
.
â Olathe
Jun 17 '15 at 3:54
 |Â
show 2 more comments
it works, but how come the new user's directory aren't created or placed under the new home?
â D.Zou
Jun 17 '15 at 3:33
How did you add the user?
â Olathe
Jun 17 '15 at 3:35
useradd then set password
â D.Zou
Jun 17 '15 at 3:38
OK, I've added a section about that.
â Olathe
Jun 17 '15 at 3:42
@Grammargeek,..
in that directory listing is/home
, which is owned byroot
. However,.
in that directory listing is/home/test
, which should be owned bytest
.
â Olathe
Jun 17 '15 at 3:54
it works, but how come the new user's directory aren't created or placed under the new home?
â D.Zou
Jun 17 '15 at 3:33
it works, but how come the new user's directory aren't created or placed under the new home?
â D.Zou
Jun 17 '15 at 3:33
How did you add the user?
â Olathe
Jun 17 '15 at 3:35
How did you add the user?
â Olathe
Jun 17 '15 at 3:35
useradd then set password
â D.Zou
Jun 17 '15 at 3:38
useradd then set password
â D.Zou
Jun 17 '15 at 3:38
OK, I've added a section about that.
â Olathe
Jun 17 '15 at 3:42
OK, I've added a section about that.
â Olathe
Jun 17 '15 at 3:42
@Grammargeek,
..
in that directory listing is /home
, which is owned by root
. However, .
in that directory listing is /home/test
, which should be owned by test
.â Olathe
Jun 17 '15 at 3:54
@Grammargeek,
..
in that directory listing is /home
, which is owned by root
. However, .
in that directory listing is /home/test
, which should be owned by test
.â Olathe
Jun 17 '15 at 3:54
 |Â
show 2 more comments
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f637405%2fhow-to-move-home-in-ubuntu%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
Run 'cd ~; pwd; ls' and tell me the results please
â Grammargeek
Jun 17 '15 at 2:49
hi, the results are posted to the question
â D.Zou
Jun 17 '15 at 3:18
Hmm weird but I meant as test2
â Grammargeek
Jun 17 '15 at 3:23
still the same result:
bash: cd: /home/test2: No such file or directory
â D.Zou
Jun 17 '15 at 3:28
What happens if you run 'mkdir /home/test'?
â Grammargeek
Jun 17 '15 at 3:30