I'm getting a new computer with Ubuntu at work, and I'm excited to set it up just like I want. However, I can't use external hard drives or install my own OS, which is a bit tricky. My personal Ubuntu laptop is perfectly set up for work, and I want to replicate that on the new machine.
Here's what I need to do:
1. Transfer all the programs I have on my personal laptop to the new machine. I heard I could export a list from apt and import it on the new setup. Is that right?
2. Copy over my personal settings, like tmux, my favorite shell app, shell configuration files, gnome extensions, and my browser settings and plugins. Is copying the Home directory enough for that? Any tips would be appreciated!
3 Answers
You can export a list of your installed applications with this command: `dpkg -l | awk '/ii/{print $2}' | paste -sd ' '`. This gives you a neat list of what’s installed through the package manager. Keep in mind that this won’t cover anything you installed using `pip` or other means.
As for copying the Home directory, yes, that's a good idea! Just remember that you might need to adjust the ownership with a command like `find [your_path] -exec chown` so that your new user can access those files properly.
For transferring your installed programs, you’ll want to use `apt-mark showmanual`—that’ll list the manually installed packages.
Regarding your settings, a lot of that info is stored in "dot-files" (those hidden files in your home directory). Just a heads up, there's a whole area of learning about "dot-file management"—it can get pretty deep! Good luck with it!
I've heard of GNU Stow being a great way to manage those dot-files!
If you’re looking to move your personal settings, you can copy the `.local` and `.config` folders from your home directory. Be cautious, though—different apps store their settings in various locations. Also, if you copy settings from one user to another, watch out for hardcoded username in the configs—they can cause issues if you're logged in as a different user.
If it’s just a couple of settings, it might be safer to set them up manually on the new machine to avoid any problems.
Thanks for the tips! For the chown command, is it enough if I keep the usernames the same? I’ve got admin rights on the new machine, so I can recreate my old username easily. Also, I was thinking of zipping my miniconda directory and uploading it to Google Drive to download it back. Should that work if I keep the directory names consistent?