Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

linux change username

# login as root and make sure that there are no active processes for user
usermod -l NEW_USERNAME OLD_USERNAME
# if user is running kill user w the following command
userUID=$(id -u OLD_USERNAME) && pkill -U $userUID
Comment

change user linux

sudo su - username
Comment

linux change user in terminal

$ whoami
user1
$ su - user2
Password:
$ whoami
user2
$ exit
logout
Comment

Changing user shell in linux

sudo chsh -s /bin/zsh <username>
Comment

Command to Change Users in a Linux

$ sudo -u <user> <command>
Comment

PREVIOUS NEXT
Code Example
Shell :: how to generate a .gitignore 
Shell :: add vimplug 
Shell :: download onenote on fedora 
Shell :: check if apache new config is running centos 
Shell :: delphes install 
Shell :: install Dagger 2 in Android studio 
Shell :: how to install alfa 1900 driver on ubuntu 
Shell :: how to sort in grep in second column in /etc/passwd 
Shell :: manjaro mute speaker 
Shell :: docker compose command 
Shell :: how to install ubuntu on mac 
Shell :: mamp mac debug logs 
Shell :: git init git remote add origin git pull 
Shell :: what is linux 
Shell :: desintaar pip de macos 
Shell :: create a tar with folder content only 
Shell :: auto finish zsh 
Shell :: ansible copy ad hoc 
Shell :: vnc share single window 
Shell :: install graphene 
Shell :: wsl2 with cisco anyconnect 
Shell :: search terminal history 
Shell :: linux split with filename extension 
Shell :: break a symbolic link in linux 
Shell :: host your pdf resume on github and jekyll 
Shell :: yum repository 
Shell :: How to undo the most recent local commits in Git 
Shell :: mac bash_profile file not being sourced 
Shell :: pyinquier install 
Shell :: Install nomachine in jetson nano 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =