Linux Server Administration - Final Exam Preparation Pt.2

0.0(0)
studied byStudied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/111

flashcard set

Earn XP

Description and Tags

Modules 4-8

Last updated 10:53 PM on 4/23/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

112 Terms

1
New cards

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

has 9 fields to store encrypted passwords and other password related 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

useradd: adds a comment when adding a user.

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

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

8
New cards

useradd -e

useradd: specifies the date that will disable a specific user account.

9
New cards

useradd -p

useradd: 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?

to define 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

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

14
New cards

userdel -f

userdel: 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

grep: Ignores case sensitivity during a search.

32
New cards

grep -r or grep -R

grep: 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

diff: reports only when files differ.

40
New cards

diff -c

diff: 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

sort: Consider only blanks and alphanumeric characters.

46
New cards

sort -f

Sort: Ignores case sensitivity

47
New cards

sort -m

sort: Merges two or more 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

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

50
New cards

cut -f

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

51
New cards

cut -c

Cut: 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

paste: Uses character DELIMITER instead of a tab.

55
New cards

paste -s

paste: Pastes 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.

67
New cards

What does the groupadd command do?

It adds a group.

68
New cards

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

It stores user account information.

69
New cards

What does the cron command do?

It is used for scheduling automated tasks.

70
New cards

What is the syntax of the crontab command?

[minute] [hour] [date of month] [month] [day of week] command

71
New cards

crontab -e

Used to edit your crontab file.

72
New cards

What does the crontab input 30 1 * * * /usr/local/bin/backupdb do?

It schedules a database backup to run daily at 1:30 AM.

73
New cards

What is a package manager?

Allows the installation, upgrading, and removal of software on Linux systems.

74
New cards

Package Manager Consistency

Ensures all libraries and packages are installed, preventing software conflicts.

75
New cards

Package Manager Security

Regular updates through package managers help secure systems against vulnerabilities.

76
New cards

Package Manager Efficiency

Disk Space and system resources are managed by installing only necessary packages and removing outdated software.

77
New cards

Package Manager Automation

Can be scripted and automated, facilitating consistent configurations across multiple systems.

78
New cards

What package manager do debian based systems use?

Advanced Package Tool (apt)

79
New cards

What package manager do Red hat based systems use?

Dandified yum (dnf)

80
New cards

What is a Linux Repository?

A central storage location for software-packages.

81
New cards

how do you update packages in Fedora?

sudo dnf update package-name

82
New cards

how do you install packages in Fedora?

sudo dnf install package name

83
New cards

What is the purpose of the tar command?

Mostly used to combine files or directory structures into a single archive file.

84
New cards

What is the name for an archive file made with the tar command?

Tarball

85
New cards

What is the syntax for the tar command?

[-options] <name of the tar archive> [files or directories]

86
New cards

tar -c

tar: creates a new archive.

87
New cards

tar -x

tar: extracts files from archive

88
New cards

tar -t

tar: Shows a list of files within the archive

89
New cards

tar -v

tar: verbose (show a list of processed files)

90
New cards

tar -f

tar: specifies the archive’s name

91
New cards

What is the purpose of the dump command?

Can backup a file system to a tape or another disk.

92
New cards

What types of backups does the dump command allow for?

Full, Differential, and Incremental.

93
New cards

Full Backup

Copies all selected data, providing a complete snapshot at a specific point in time.

94
New cards

Incremental Backup

Saves only the data that has changed since the last backup of any type.

95
New cards

Differential Backup

Saves all data changed since the last full backup.

96
New cards

What is the syntax for the dump command?

[options] <filesystem>

97
New cards

dump -0

specifies a full backup.

98
New cards

dump -1 (all the way to) -9

Specifies an incremental backup.

99
New cards

dump -f

dump: Specify the output file or device.

100
New cards

What is the purpose of the "rsync” command?

Allows for fast and efficient file transferring and synchronization between directories and systems.