Basic Package Man Flashcards

1
Q

Where is the metadata for rpm packages located?

A

/var/lib/rpm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

query all installed packages

A

rpm -qa

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

query whether a specific package is installed

A

rpm -q perl

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

list only the documentation of a a package

A

rpm -qd audit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

list config files of a package

A

rpm -qc cups

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

identify which package owns the specified file

A

rpm -qf /etc/passwd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

display info about an installed package

A

rpm -qi setup

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

list all file and package dependencies for a package

A

rpm -qR chrony

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

determine what packages require the specified package in order to operate properly

A

rpm -q –whatrequires lvm2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

install zsh

A

sudo rpm -ivh /mnt/BaseOS/Packages/zsh-5.5.1-6.el8.x86_64.rpm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

upgrade zsh

A

sudo rpm -Uvh /mnt/BaseOS/Packages/zsh-5.5.1-6.el8.x86_64.rpm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

refresh package

A

sudo rpm -Fvh /mnt/BaseOS/Packages/zsh-5.5.1-6.el8.x86_64.rpm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

overwrite zsh

A

sudo rpm -ivh –replacepkgs /mnt/BaseOS/Packages/zsh-5.5.1-6.el8.x86_64.rpm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

remove zsh

A

sudo rpm zsh -ve

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

check integrity of zsh

A

rpm -K /mnt/BaseOS/Packages/zsh-5.5.1-6.el8.x86_64.rpm –nosignature

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

import GPG keys for authenticity

then check authenticity of zsh

A

sudo rpmkeys –import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

sudo rpmkeys -K /mnt/BaseOS/Packages/zsh-5.5.1-6.el8.x86_64.rpm

17
Q

Verify at attributes including owner, group, perms etc…

A

sudo rpm -V at
if it returns nothing, then it means the file is intact
Change permissions and it will present a message:
.M…….. c /etc/sysconfig/atd = meaning the perms have changed