Block 4 + Flashcards
How to add a user. -c. And -G
Useradd. -c for comment (usually full name. -G to add to a specific group
Create password.
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
Find text like grep but put output into columns
awk
awk format
awk -F ‘:’ “{print $1}” file, print column 1. Sort @ :
What is APT and what is it used for
Advance packaging tool. Used to bring or get rid of apps from the terminal
Apt remove
Removes the app but keeps associated files
Apt purge
Gets rid of app and all related files.
Apt update
Will list all available updates
Apt upgrade
Will update all software
What is dpkg -l
Search system for all packages (apps) and list
What is top
Shows all processes. Like windows task manager