change ubuntu username
echo $USER
# To manage every aspect of the user database, you use the usermod tool.
# To change username (it is probably best to do this without being logged in):
sudo usermod -l newUsername oldUsername
# This however, doesn't rename the home folder.
# To change home-folder, use
sudo usermod -d /home/newHomeDir -m newUsername# -l changes login name
# -d changes home directory
# -m copies over contents from old home directory
usermod -l <newname> -d /home/<newname> -m <oldname>
# NOTE: will not work if you are currently logged on as user
# - workaround by temporarily enabling root account and running above command there
# [sudo passwd root]
# - after root account has been used to change username lock it using
# [sudo passwd -l root]
Also in C++:
- make a join function in bash script arrays
- pom version increment linux
- could not find tools.jar linux
- my numpad stopped working in ubuntu
- remove snap package
- git set head to commit
- create repository in github using command line
- rust install windows
- clear history centos
- how to install git centos 8
- git cherry pick resolve conflict
- linux search all directories for file
- ubuntu 18.04 create folders in dock
- flutter generate json files
- magento 2 check version command line
- check if tensorflow gpu is installed
- get coordinates of the cursor ubuntu
- sed range of lines result
- how to run heroku scrapy file from terminal
- docker run jenkins
- an audio or video streams is not handled due to missing codec
- bash transform uppercase to lowercase
- install docker compose ubuntu 20.04
- how to install git in cmd on windows with terminal