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

bash change user

sudo su - username
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 :: git create branch from tag 
Shell :: docker starting too long 
Shell :: How to check if there are multiple versions of PHP installed on Ubuntu 12.04 LTS? 
Shell :: ubuntu docker host ip 
Shell :: kali linux 
Shell :: Install PHP Plugin ubuntu 
Shell :: aws folder permission denied 
Shell :: blackeye linux 
Shell :: flutter path mac 
Shell :: linkedin pc download on ubuntu 
Shell :: command to install MySQL 
Shell :: open image from terminal in ubuntu 18 
Shell :: check ntp server linux 
Shell :: how to install snap store on kali linux 
Shell :: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root? 
Shell :: git push origin main not working 
Shell :: git rename master branch to main 
Shell :: centos vmware guest mount shared folder 
Shell :: how to change branch name in github 
Shell :: git rev-parse --short HEAD 
Shell :: how to stop a port in macos 
Shell :: mac xterm download 
Shell :: cmake install 
Shell :: create a sudo user in centos 7 
Shell :: copy whole directory command line 
Shell :: git remove chached 
Shell :: remove git repository 
Shell :: git flow hotfix 
Shell :: $() vs `` bash 
Shell :: Uninstall Applications in ubuntu through the Command Line 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =