Current Size:
Chakra BreakPoints
base0px
sm480px
md768px
lg992px
xl1280px
2xl1536px
Current Height:Width
widthpx
heightpx

Subjects

Linux distribution Environment Setup

Date Created: 2022/02/16

Last Update: 2022/12/22

#linux #setup #reference

General

List All Users

vim /etc/passwd

See Groups of User

groups

Switch from User To Root

From a given user;

sudo -i

Switch from Root to User

su <user-name>

Adding Users, Passwords and Groups

Add User

useradd <new-username>

Add Password to User

sudo passwd <new-username>
# props for password and password confirmation

Delete User

deluser -r <user-name>

Change Permissions

| | | |--| --| --| | u | user | | g | group | | o | other people (everyone else) |

Add A Permission

chmod <permission-group>+<behavior> <file-or-dir-name>

Example

chmod o+w foo.txt
chmod g+w foo.txt
chmod o+g foo.txt

Remove Permission

chmod o-w foo.txt

Set Permissions for group

chmod 754 foo.txt
# -rwxr-xr--

CheatSheet

d rwx r-x r-x

owner group everyone

d : d in the first place means the element is a directory

- : - elment is a file

r : read

w : write

x : excute

7 : rwx : read write and excute

6 : rw- : read and write

5 : r-x : read and excute

4 : r-- : read

2 : -w- : write

1 : --x : excute

0 : --- : no permisions

Reference

user groups permissions - section.io

More Notes

All Notes
HomeProjects

Links

Home Articles Notes Projects About Style Guide Site Credits

Contact

 [email protected]

Location

🌎 Earth