102.4 Flashcards

1
Q

Which command is used to install a package using the Debian package management system?
A) apt-get install
B) rpm -i
C) yum install
D) dnf install

A

A) apt-get install

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

How do you remove a package but keep its configuration files using apt?
A) apt-get purge
B) apt-get remove
C) dpkg -r
D) apt-get clean

A

B) apt-get remove

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

Which command updates the package list in a Debian-based system?
A) apt-get update
B) dpkg –update
C) apt-get upgrade
D) apt-cache refresh

A

A) apt-get update

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

What is the purpose of the dpkg command in the Debian package management system?
A) To download packages from repositories
B) To install, remove, and manage Debian packages
C) To update package list
D) To configure system services

A

B) To install, remove, and manage Debian packages

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

How can you check the status of a specific package using dpkg?
A) dpkg -i
B) dpkg –status
C) apt-get check
D) dpkg -l package_name

A

D) dpkg -l package_name

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

Which command will fully remove a package and its configuration files?
A) apt-get remove
B) apt-get purge
C) dpkg -i
D) apt-cache remove

A

B) apt-get purge

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

What does ‘apt-cache search’ do?
A) It clears the package cache
B) It searches for available packages in the repository
C) It installs packages from the cache
D) It removes unused package files

A

B) It searches for available packages in the repository

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

How can you upgrade all packages on a Debian-based system?
A) apt-get upgrade
B) dpkg –upgrade
C) apt-cache update
D) apt-get update

A

A) apt-get upgrade

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

Which command shows details about a package?
A) apt-cache show package_name
B) apt-get info package_name
C) dpkg -l package_name
D) dpkg –info package_name

A

A) apt-cache show package_name

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

How can you list all installed packages on a Debian-based system?
A) dpkg –list
B) apt-get list-installed
C) rpm -qa
D) apt-cache list

A

A) dpkg –list

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

Which command installs a package without upgrading the system?
A) apt-get install package_name
B) apt-get dist-upgrade package_name
C) dpkg –upgrade package_name
D) apt-get update package_name

A

A) apt-get install package_name

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

How can you download a package without installing it?
A) apt-get download package_name
B) dpkg -r package_name
C) apt-cache show package_name
D) apt-get install –no-install

A

A) apt-get download package_name

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

What command fixes broken dependencies on a Debian-based system?
A) dpkg –fix-broken
B) apt-get install -f
C) apt-get fix-dep
D) dpkg –repair

A

B) apt-get install -f

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

How can you remove orphaned packages automatically?
A) apt-get autoremove
B) dpkg -r –orphans
C) apt-cache clean
D) dpkg –autoremove

A

A) apt-get autoremove

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

What does ‘dpkg-reconfigure’ do?
A) It reconfigures installed packages
B) It reinstalls a package
C) It updates the package cache
D) It cleans up configuration files

A

A) It reconfigures installed packages

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

Which file contains information about the repositories?
A) /etc/apt/sources.list
B) /etc/apt/repositories
C) /var/lib/apt/lists
D) /etc/dpkg/repositories

A

A) /etc/apt/sources.list

17
Q

Which command lists all dependencies of a package?
A) apt-cache depends package_name
B) dpkg –depends package_name
C) apt-get check package_name
D) dpkg -d package_name

A

A) apt-cache depends package_name

18
Q

Which command cleans the downloaded package files to free up space?
A) apt-get clean
B) dpkg –clean
C) apt-get purge
D) apt-cache clear

A

A) apt-get clean

19
Q

How can you simulate the installation of a package?
A) apt-get install -s package_name
B) dpkg –simulate package_name
C) apt-get install –dry-run package_name
D) apt-cache show package_name

A

A) apt-get install -s package_name

20
Q

How can you check if a package is installed on the system?
A) dpkg -l package_name
B) apt-get list-installed package_name
C) dpkg -s package_name
D) apt-cache search package_name

A

A) dpkg -l package_name

21
Q

How can you view the description of a package?
A) apt-cache show package_name
B) dpkg –info package_name
C) apt-get describe package_name
D) dpkg -l package_name

A

A) apt-cache show package_name

22
Q

Which command marks a package to be held back from upgrading?
A) apt-mark hold package_name
B) apt-get remove –hold package_name
C) dpkg –hold package_name
D) apt-cache keep package_name

A

A) apt-mark hold package_name

23
Q

How do you manually configure a package after installation?
A) dpkg-reconfigure package_name
B) apt-get configure package_name
C) dpkg –install package_name
D) apt-get reconfigure package_name

A

A) dpkg-reconfigure package_name

24
Q

How can you view the changelog of a package?
A) apt-get changelog package_name
B) dpkg –changelog package_name
C) dpkg –log package_name
D) apt-cache changelog package_name

A

A) apt-get changelog package_name

25
Q

What does ‘apt-get dist-upgrade’ do?
A) Upgrades all packages including removing obsolete ones
B) Installs new packages
C) Fixes broken dependencies
D) Upgrades packages without installing new ones

A

A) Upgrades all packages including removing obsolete ones

26
Q

How can you lock a package to prevent it from being upgraded?
A) apt-mark hold package_name
B) dpkg –lock package_name
C) apt-get lock package_name
D) apt-cache hold package_name

A

A) apt-mark hold package_name

27
Q

Which command lists the available versions of a package?
A) apt-cache policy package_name
B) dpkg –policy package_name
C) apt-get version package_name
D) apt-mark policy package_name

A

A) apt-cache policy package_name

28
Q

How can you search for a package by its description?
A) apt-cache search keyword
B) dpkg –search keyword
C) apt-get find keyword
D) apt-cache find keyword

A

A) apt-cache search keyword

29
Q

Which command removes unnecessary packages installed as dependencies?
A) apt-get autoremove
B) dpkg –clean
C) apt-get purge
D) apt-cache clean

A

A) apt-get autoremove

30
Q

How can you check which package a file belongs to?
A) dpkg -S filename
B) apt-get file-search filename
C) dpkg –info filename
D) apt-cache show filename

A

A) dpkg -S filename