1/65
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is the purpose of the /etc/shadow file in Linux?
to view the user’s password aging information.
what is the purpose of the chage command?
to manage and modify the aging properties of user accounts, specifically passwords.
What does the passwd command do?
it prompts you to make a new password for a user account.
what does the useradd command do?
adds a user account
useradd -c
adds a comment to the useradd command.
useradd -aG
specifies the secondary group that will be on the user account. does not remove the secondary group already applied to the account.
useradd -g
specifies the initial group that will be used on the user account.
useradd -e
specifies the date that will disable a specific user account.
useradd -p
specifies a password for a user account.
what is the purpose of the /etc/gshadow file?
Stores hashed group passwords.
What is the purpose of the /etc/group file in Linux?
Defines the groups to which a user belongs to.
What happens when you delete a user account?
You remove the user’s ability to login, revokes access to the system, and removes their associated user-to-group connections. Other things have to be deleted manually.
userdel -r
removes the user account, as well as the home directory.
userdel -f
Forces the deletion of the user account and everything in it.
What are two examples of Command-Line text editors?
VIM and Nano
What Vim mode does NOT allow you to type text into the file?
Command
What Vim mode allows you to type text into the text file?
Insert
How do you enter the Vim insert mode?
“I” key
How do you exit Insert mode and re-enter Command mode in the Vim editor?
“esc” key
How do you save your work in the Vim editor?
“w” key then enter
How do you quit the Vim editor?
in command mode, type “Shift” + “;”
How do you Save & Quit the vim editor?
In command mode, type “:wq”.
How do you force quit Vim?
Enter command mode, and type "q!”.
How do you delete a line in Vim?
In Vim, type “dd”
What does “>” do?
It overwrites an existing file or creates a new file.
What does “>>” do?
It adds/appends to an existing file.
What does “<“ do?
Tells the shell to take input for a program or a command from a file instead of the keyboard.
What does “|” (Pipe) do?
is used to pipe the output of one command so it becomes the input for another command.
What does the grep command do?
It examines each line of data it receives and outputs every line that contains patterns.
What does the uniq command do?
sorts data, as well as removes duplicate lines.
grep -i
Ignores case sensitivity during a search.
grep -r or grep -R
recursively search files in directories.
grep ‘^example’ output.txt
Searches for patterns at the beginning of the line.
grep ‘example$’ output.txt
Searches for patterns at the end of a line.
What is the syntax of the Join command?
[options] file1.txt file2.txt
What does the Head command do?
Outputs the first few lines of its input. Useful for getting the header of a file.
what does the tail command do?
Outputs the last few lines of its input. Useful for getting the most recent entries of a file.
what does the diff command do?
Analyzes two files and prints the lines that are different.
diff -q
reports only when files differ.
diff -c
outputs number of lines of copied context. Default is 3.
What does the comm command do?
compares sorted files line-by-line. Produces three column output.
comm -1
suppress column 1 (lines unique to file1)
comm -2
suppress column 2 (lines unique to file2)
What does the sort command do?
Will rearrange the lines in a text file so that they are sorted numerically and alphabetically.
sort -d
Consider only blanks and alphanumeric characters.
sort -f
Ignores case sensitivity
sort -m
Merges two or mroe input files into one sorted input.
What does the cut command do?
print selected parts of lines from a file to standard output.
cut -d
use character DELIM instead of a tab for the field delimiter.
cut -f
select only these fields on each line, also prints any line that does not contain a delimiter.
cut -c
Select only the characters from each line as specified in a list of characters.
What does the paste command do?
Displays the corresponding lines of multiple files side-by-side.
What is the Syntax for the paste command?
[OPTION(s)] [FILE(s)]
paste -d
Uses character DELIMITER instead of a tab.
paste -s
paste one file at a time instead of parallel.
What does the ifconfig command do?
Used to configure and/or view the configuration of a network interface.
ifconfig -a
Displays all network interfaces on the system, including ones that are inactive.
What is the syntax for the ifconfig command?
command [Interface] [options]
how would you disable an interface using the ifconfig command
ifconfig int down
How would you enable an interface using the ifconfig command?
ifconfig int up
what is the use of the /etc/hosts file in Linux?
to map IP Addresses to hostnames or domain names.
rlogin
A legacy command-line utility in Unix-like systems that allows users to log in to a remote host over a network, using TCP port 513.
SSH
A network protocol that provides a secure way to log into and manage remote systems.
Telnet
Used for remote access, network troubleshooting, and port checking.
scp
A utility for securely copying files and directories between a remote host and a local host using SSH.
ftp
Connects a computer system to a remote server using the FTP protocol. When connected, it allows for file transfer.