Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

change username ubuntu

# -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]
Comment

how to change users in ubunut terminal

first --
sudo su 
then --
su username
Comment

ubuntu change user

su -l [user]
Comment

PREVIOUS NEXT
Code Example
Shell :: pulls OS name and version linux 
Shell :: beyond compare mac using brew 
Shell :: refusing to exec crouton from noexec mount 
Shell :: active ssh users in ubuntu 
Shell :: see what groups a user is in linux 
Shell :: linux shell arguments 
Shell :: git reset initial commit 
Shell :: how install node 14 ubuntu 
Shell :: powershell replace and rename file name 
Shell :: bash if is symlink 
Shell :: grep in file content 
Shell :: linux check ssh connections 
Shell :: change file permission linux 
Shell :: bash command to clean up log files 
Shell :: git create tag and push 
Shell :: permission denied /dev/ttyusb0 
Shell :: new ssh key github 
Shell :: linux alias 
Shell :: open files from terminal linux 
Shell :: user.signingkey git 
Shell :: get users shell 
Shell :: setup redis ubuntu 
Shell :: undo most recent commit 
Shell :: sudo windows 
Shell :: bash how to delete blank lines 
Shell :: flutter cmdline-tools component is missing 
Shell :: regolith linux 
Shell :: run command as root administrator mac 
Shell :: linux remove link 
Shell :: how to start ngrok server 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =