LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-25-2023, 11:28 AM   #1
dave999
LQ Newbie
 
Registered: Jul 2023
Posts: 9

Rep: Reputation: 0
Can I use the same username when installing a new version of LM and keep my files?


hi,

I am currently on linux mint 20.2. I will install linux mint 21.2 victoria.


My quesion is during the installation where it is asking to create a user, can I use the same user name 'dave' from linux mint 20? And if I use the same user name 'dave' will all my files and config files still be there in /home/dave? or will it erase everything?

Thanks in advance.

Last edited by dave999; 07-25-2023 at 11:31 AM.
 
Old 07-25-2023, 12:48 PM   #2
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,503

Rep: Reputation: Disabled
If your /home is on a separate partition, yes, providing the installer will let you use a ready formatted /home.

Otherwise, a new installation will most likely overwrite the whole disk - (you should really have a back up on external media of all your personal files).

Can you not just upgrade your installed operating system(?).
 
Old 07-25-2023, 03:41 PM   #3
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,830
Blog Entries: 1

Rep: Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069Reputation: 2069
As fatmac explained, a current separate filesystem for your /home/ can be preserved for use with a new installation. What follows assumes that a separate /home/ is what you currently have, and that you do in fact preserve it's use with the new installation.

Take a gander at your own home directory and you should see something similar to the following:
Code:
# inxi -S
System:
  Host: p5bse Kernel: 5.15.0-78-generic arch: x86_64 bits: 64
    Console: pty pts/0 Distro: Linux Mint 21.2 Victoria
# ls -an /home/firefox/
total 40
drwxrwxr-x  20 1060 100 1024 Jun  2  2019 .
drwxr-xr-x. 20    0   0 8192 Jun 29 16:35 ..
-rw-------   1 1060 100    0 Oct 23  2014 .ICEauthority
-rw-------   1 1060 100    0 Oct 23  2014 .Xauthority
-rw-------   1 1060 100  477 Jun  2  2019 .bash_history
drwx------   3 1060 100 1024 Dec 30  2012 .cache
drwx------.  9 1060 100 1024 Jun  2  2019 .config
drwx------   3 1060 100 1024 Dec 30  2012 .dbus
-rw-------   1 1060 100   22 Oct 23  2014 .dmrc
-rw-------   1 1060 100   16 Dec 30  2012 .esd_auth
drwxr-xr-x   2 1060 100 1024 Aug  5  2013 .gstreamer-1.0
drwxr-xr-x   3 1060 100 1024 Dec 30  2012 .local
drwxr-xr-x   3 1060 100 1024 Aug  4  2013 .mc
drwxr-xr-x   3 1060 100 1024 Aug 14  2013 .mcop
drwx------   2 1060 100 1024 Aug  5  2013 .pulse
drwxrwxr-x   2 1060 100 1024 Sep 13  2013 .skel
-rw-------   1 1060 100    0 Oct 23  2014 .xsession-errors
drwxr-xr-x   2 1060 100 1024 Sep 13  2013 Desktop
drwxr-xr-x   2 1060 100 1024 Aug  4  2013 Documents
drwxr-xr-x   2 1060 100 1024 Dec 31  2012 bin
Files and directories here are actually owned by user 1060 who is a member of group 100. The password management system associates 1060 with a username, and 100 with a group name. If on installation your use of dave fails to result in all your old data being visibly present in your new homedir, it would be because the installer assigned dave to a different number and/or group. That can be changed if necessary with useradd/userdel and groupadd/groupdel:
Code:
# which groupadd
/usr/sbin/groupadd
# which groupdel
/usr/sbin/groupdel
# which useradd
/usr/sbin/useradd
# which userdel
/usr/sbin/userdel
Odds are your current user dave is user 1000 and belongs to group named users assigned 100, and this would happen again with a new installation.
 
Old 07-25-2023, 06:04 PM   #4
dave999
LQ Newbie
 
Registered: Jul 2023
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by fatmac View Post
If your /home is on a separate partition, yes, providing the installer will let you use a ready formatted /home.

Otherwise, a new installation will most likely overwrite the whole disk - (you should really have a back up on external media of all your personal files).

Can you not just upgrade your installed operating system(?).
I tried that first. the update manager doesn't have Linux Mit 21.2 listed in the Edit menu. I need mintupdate (6.0.3 or higher). My current version after doing apt update is vesion 5.8.4.


Quote:
Originally Posted by mrmazda View Post
As fatmac explained, a current separate filesystem for your /home/ can be preserved for use with a new installation. What follows assumes that a separate /home/ is what you currently have, and that you do in fact preserve it's use with the new installation.

Take a gander at your own home directory and you should see something similar to the following:
Code:
# inxi -S
System:
  Host: p5bse Kernel: 5.15.0-78-generic arch: x86_64 bits: 64
    Console: pty pts/0 Distro: Linux Mint 21.2 Victoria
# ls -an /home/firefox/
total 40
drwxrwxr-x  20 1060 100 1024 Jun  2  2019 .
drwxr-xr-x. 20    0   0 8192 Jun 29 16:35 ..
-rw-------   1 1060 100    0 Oct 23  2014 .ICEauthority
-rw-------   1 1060 100    0 Oct 23  2014 .Xauthority
-rw-------   1 1060 100  477 Jun  2  2019 .bash_history
drwx------   3 1060 100 1024 Dec 30  2012 .cache
drwx------.  9 1060 100 1024 Jun  2  2019 .config
drwx------   3 1060 100 1024 Dec 30  2012 .dbus
-rw-------   1 1060 100   22 Oct 23  2014 .dmrc
-rw-------   1 1060 100   16 Dec 30  2012 .esd_auth
drwxr-xr-x   2 1060 100 1024 Aug  5  2013 .gstreamer-1.0
drwxr-xr-x   3 1060 100 1024 Dec 30  2012 .local
drwxr-xr-x   3 1060 100 1024 Aug  4  2013 .mc
drwxr-xr-x   3 1060 100 1024 Aug 14  2013 .mcop
drwx------   2 1060 100 1024 Aug  5  2013 .pulse
drwxrwxr-x   2 1060 100 1024 Sep 13  2013 .skel
-rw-------   1 1060 100    0 Oct 23  2014 .xsession-errors
drwxr-xr-x   2 1060 100 1024 Sep 13  2013 Desktop
drwxr-xr-x   2 1060 100 1024 Aug  4  2013 Documents
drwxr-xr-x   2 1060 100 1024 Dec 31  2012 bin
Files and directories here are actually owned by user 1060 who is a member of group 100. The password management system associates 1060 with a username, and 100 with a group name. If on installation your use of dave fails to result in all your old data being visibly present in your new homedir, it would be because the installer assigned dave to a different number and/or group. That can be changed if necessary with useradd/userdel and groupadd/groupdel:
Code:
# which groupadd
/usr/sbin/groupadd
# which groupdel
/usr/sbin/groupdel
# which useradd
/usr/sbin/useradd
# which userdel
/usr/sbin/userdel
Odds are your current user dave is user 1000 and belongs to group named users assigned 100, and this would happen again with a new installation.
Yes, I do have have my /home folder on a separate partition. I also know that I need to uncheck format on the /home partition.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Ubuntu Users Can Now Keep PPAs And Third Party Repositories Enabled When Upgrading To A Newer Ubuntu Version LXer Syndicated Linux News 0 01-28-2019 01:31 AM
[SOLVED] is it possible to effectively use of repos from newer version of the same system? froff Ubuntu 13 12-22-2011 05:51 PM
Need to replace a file with a newer version but keep the old file via a rename Joe_P Linux - Newbie 4 04-30-2009 03:51 PM
older and newer version of a package at the same time Ayman.mashal Linux - Newbie 1 07-29-2005 10:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:21 AM.

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