Quiz 2 Preparation - Linux Server Administration

0.0(0)
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/65

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

66 Terms

1
New cards

What is the purpose of the /etc/shadow file in Linux?

to view the user’s password aging information.

2
New cards

what is the purpose of the chage command?

to manage and modify the aging properties of user accounts, specifically passwords.

3
New cards

What does the passwd command do?

it prompts you to make a new password for a user account.

4
New cards

what does the useradd command do?

adds a user account

5
New cards

useradd -c

adds a comment to the useradd command.

6
New cards

useradd -aG

specifies the secondary group that will be on the user account. does not remove the secondary group already applied to the account.

7
New cards

useradd -g

specifies the initial group that will be used on the user account.

8
New cards

useradd -e

specifies the date that will disable a specific user account.

9
New cards

useradd -p

specifies a password for a user account.

10
New cards

what is the purpose of the /etc/gshadow file?

Stores hashed group passwords.

11
New cards

What is the purpose of the /etc/group file in Linux?

Defines the groups to which a user belongs to.

12
New cards

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.

13
New cards

userdel -r

removes the user account, as well as the home directory.

14
New cards

userdel -f

Forces the deletion of the user account and everything in it.

15
New cards

What are two examples of Command-Line text editors?

VIM and Nano

16
New cards

What Vim mode does NOT allow you to type text into the file?

Command

17
New cards

What Vim mode allows you to type text into the text file?

Insert

18
New cards

How do you enter the Vim insert mode?

“I” key

19
New cards

How do you exit Insert mode and re-enter Command mode in the Vim editor?

“esc” key

20
New cards

How do you save your work in the Vim editor?

“w” key then enter

21
New cards

How do you quit the Vim editor?

in command mode, type “Shift” + “;”

22
New cards

How do you Save & Quit the vim editor?

In command mode, type “:wq”.

23
New cards

How do you force quit Vim?

Enter command mode, and type "q!”.

24
New cards

How do you delete a line in Vim?

In Vim, type “dd”

25
New cards

What does “>” do?

It overwrites an existing file or creates a new file.

26
New cards

What does “>>” do?

It adds/appends to an existing file.

27
New cards

What does “<“ do?

Tells the shell to take input for a program or a command from a file instead of the keyboard.

28
New cards

What does “|” (Pipe) do?

is used to pipe the output of one command so it becomes the input for another command.

29
New cards

What does the grep command do?

It examines each line of data it receives and outputs every line that contains patterns.

30
New cards

What does the uniq command do?

sorts data, as well as removes duplicate lines.

31
New cards

grep -i

Ignores case sensitivity during a search.

32
New cards

grep -r or grep -R

recursively search files in directories.

33
New cards

grep ‘^example’ output.txt

Searches for patterns at the beginning of the line.

34
New cards

grep ‘example$’ output.txt

Searches for patterns at the end of a line.

35
New cards

What is the syntax of the Join command?

[options] file1.txt file2.txt

36
New cards

What does the Head command do?

Outputs the first few lines of its input. Useful for getting the header of a file.

37
New cards

what does the tail command do?

Outputs the last few lines of its input. Useful for getting the most recent entries of a file.

38
New cards

what does the diff command do?

Analyzes two files and prints the lines that are different.

39
New cards

diff -q

reports only when files differ.

40
New cards

diff -c

outputs number of lines of copied context. Default is 3.

41
New cards

What does the comm command do?

compares sorted files line-by-line. Produces three column output.

42
New cards

comm -1

suppress column 1 (lines unique to file1)

43
New cards

comm -2

suppress column 2 (lines unique to file2)

44
New cards

What does the sort command do?

Will rearrange the lines in a text file so that they are sorted numerically and alphabetically.

45
New cards

sort -d

Consider only blanks and alphanumeric characters.

46
New cards

sort -f

Ignores case sensitivity

47
New cards

sort -m

Merges two or mroe input files into one sorted input.

48
New cards

What does the cut command do?

print selected parts of lines from a file to standard output.

49
New cards

cut -d

use character DELIM instead of a tab for the field delimiter.

50
New cards

cut -f

select only these fields on each line, also prints any line that does not contain a delimiter.

51
New cards

cut -c

Select only the characters from each line as specified in a list of characters.

52
New cards

What does the paste command do?

Displays the corresponding lines of multiple files side-by-side.

53
New cards

What is the Syntax for the paste command?

[OPTION(s)] [FILE(s)]

54
New cards

paste -d

Uses character DELIMITER instead of a tab.

55
New cards

paste -s

paste one file at a time instead of parallel.

56
New cards

What does the ifconfig command do?

Used to configure and/or view the configuration of a network interface.

57
New cards

ifconfig -a

Displays all network interfaces on the system, including ones that are inactive.

58
New cards

What is the syntax for the ifconfig command?

command [Interface] [options]

59
New cards

how would you disable an interface using the ifconfig command

ifconfig int down

60
New cards

How would you enable an interface using the ifconfig command?

ifconfig int up

61
New cards

what is the use of the /etc/hosts file in Linux?

to map IP Addresses to hostnames or domain names.

62
New cards

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.

63
New cards

SSH

A network protocol that provides a secure way to log into and manage remote systems.

64
New cards

Telnet

Used for remote access, network troubleshooting, and port checking.

65
New cards

scp

A utility for securely copying files and directories between a remote host and a local host using SSH.

66
New cards

ftp

Connects a computer system to a remote server using the FTP protocol. When connected, it allows for file transfer.