New answers tagged

2

sudo doesn't necessarily update the HOME variable for the new user. If you want HOME updated, use the -H or -i options. For example: sudo -Hu newuser bash Alternatively, you can add this line to the /etc/sudoers file to have sudo automatically update HOME and other relevant variables: Defaults env_reset Many distributions already have ...


3

The manual page for userdel describes the -r option, which would remove the home-directory at the time you removed the user. If you did not do it then, you could find files with no known user with the find option -nouser, e.g., find /home -nouser -delete though you might want to verify the list before actually deleting the files: find /home -nouser -ls ...


3

These folders are not made/used by the system during user creation because the system doesn't generate them. They are generated the package xdg-user-dirs-update (Ubuntu) and xdg-user-dirs (Fedora/RHEL). The file /usr/bin/xdg-user-dirs-update is run at logon and creates the files based on defaults in /etc/xdg/user-dirs.defaults, or if it exists $HOME/....


2

tar There is a plethora of possibilities on how to perform this. A common way that i saw people using since a long time ago was to build a script that just tar's all their configuration; then they just download the tar file and unpack. It could involve a file called myconf with a content like: .vimrc .bashrc .profile .xinitrc .vifm .xmonad Then you run ...


1

My suggestion would be to have your configurations on a flash drive, remote server, or remote repository (GitHub is always nice). That way it is a quick plug in, scp, or git away from being where you need it. Another option is to carry a persistent bootable flash drive with you. Your settings and configurations will be one boot away when hardware is around. ...



Top 50 recent answers are included