Linux - Root Commands
This is Part 8 of the Linux CLI Commands series.
π Previous: Linux - Compress Commands
π Next: Linux - File Transfer Commands
Root Commands
su - root
-- switch user
su root
-- swith user in the current path
useradd username
-- to create a user
passwd username
-- to set a passwd for that user
useradd -g primary_group_name user_name -G Sub_group_name
-- use to create user and add primary and secondary group
usermod -g primary_group_name user_name -G Sub_group_name
-- to add primary and secondary group for the user
usermod -c
-- modify the content of the user
usermod -e
-- modify the date
usermod -l
-- modify user name
userdel -f
-- remove user while login
userdel -r
-- remove user and home path
groupadd group_name
-- to creata a group
groupdel group_name
-- to delete group
cat /etc/passwd
-- to check users
cat /etc/group
-- to check group
fdisk -l
-- for list out the disk
sudo
-- other users can access the root commands
vi /etc/sudoers
-- add users in this sudoers file to access the root commands
Top comments (0)