Block 4 + Flashcards
(33 cards)
How to add a user. -c. And -G
Useradd. -c for comment (usually full name. -G to add to a specific group
Create password in linux
Passwd. Also creates a new user and user group.
Modify a user. And how to lock their account
Usermod. -L to lock account.
Delete a user
Userdel
Archive and gzip compress
Tar -czf
Archive and bzip2 compress
Tar -cjf
Archive and xz compress
Tar -cJf
Preview a tar file without decompressing it
Tar -tf
Unzip any type of files
Tar -xf
How to change permissions
Chmod
Adding a group to system
groupadd
Renaming a group and new name sub
groupmod. -n to change name. New name…old name
Group delete
groupdel
Get info on users and groups
retention (get entity).
What d holds list of groups and members
/etc/group
Adding a user to group
usermod -aG group user
Remove user from all groups but their own
usermod -G
Shows location of binary files
which $(passwd)
Finds all versions of word, upper case, lower case, 1st letter cap and rest lower
grep -i
Find everything that doesn’t contain the word
grep -v
Shows what line text is on
grep -n
Shows 5 lines before line with text
grep -b5
Find how many times the text shows up
grep -c
How to search a dir
grep -r