102.3 Flashcards

1
Q

Which command is used to display shared library dependencies?
a) ldd
b) ldconfig
c) libcheck

A

ldd

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

Where are the default shared libraries typically stored?
a) /lib and /usr/lib
b) /var/lib
c) /usr/local/lib

A

/lib and /usr/lib

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

What command is used to update the shared library cache?
a) ldconfig
b) ldd
c) libconfig

A

ldconfig

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

Which file lists the directories containing shared libraries?
a) /etc/ld.so.conf
b) /usr/lib.conf
c) /etc/lib.conf

A

/etc/ld.so.conf

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

What does the LD_LIBRARY_PATH environment variable specify?
a) Locations of additional shared libraries
b) Default system library path
c) Shared libraries cache file

A

Locations of additional shared libraries

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

How can you force the system to reload the shared library cache?
a) ldconfig -v
b) ldd –reload
c) ldconfig -f

A

ldconfig -v

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

What is the role of /etc/ld.so.cache?
a) Stores cached information about shared libraries
b) Lists all shared libraries
c) Defines paths for shared libraries

A

Stores cached information about shared libraries

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

How can you check the version of the GNU C library?
a) ldd –version
b) glibc –check
c) libversion

A

ldd –version

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

Which environment variable can override the default search path for shared libraries?
a) LD_LIBRARY_PATH
b) LIB_CONFIG_PATH
c) SHARED_LIB_PATH

A

LD_LIBRARY_PATH

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

What does the term ‘soname’ refer to?
a) A specific version of a shared library
b) Library configuration file
c) Library search path

A

A specific version of a shared library

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

Which directory is primarily used for 64-bit shared libraries?
a) /lib64
b) /lib
c) /usr/lib64

A

/lib64

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

What command can list all the currently loaded shared libraries?
a) ldconfig -p
b) ldd –list
c) liblist

A

ldconfig -p

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

Which option of the ‘ldd’ command prevents execution of shared libraries?
a) –verbose
b) –version
c) –warn

A

–warn

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

What is the main purpose of shared libraries?
a) To reduce memory usage by sharing common code
b) To store compiled binaries
c) To organize program files

A

To reduce memory usage by sharing common code

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

Which file defines the default library load paths?
a) /etc/ld.so.conf
b) /lib/ld.conf
c) /usr/ld.conf

A

/etc/ld.so.conf

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

Which command can you use to display which shared libraries a binary uses?
a) ldd
b) ldconfig
c) libdump

A

ldd

17
Q

What is the typical extension of shared libraries in Linux?
a) .so
b) .lib
c) .dll

A

.so

18
Q

How can you add a new library path to the system?
a) Edit /etc/ld.so.conf and run ldconfig
b) Use ldd with the new path
c) Edit /etc/ldconfig.conf

A

Edit /etc/ld.so.conf and run ldconfig

19
Q

Which command clears the shared library cache?
a) ldconfig -r
b) libclear
c) ldconfig –clear

A

ldconfig -r

20
Q

What is the primary role of ‘libc’ in Linux?
a) Standard C library
b) Shared memory manager
c) Kernel interface

A

Standard C library

21
Q

What is a common reason for ‘library not found’ errors?
a) Incorrect library paths
b) Missing binary file
c) Permission issues

A

Incorrect library paths

22
Q

Which command removes a shared library?
a) rm <library>
b) libremove
c) unlink <library></library></library>

A

rm <library></library>

23
Q

Which of the following is a dynamically linked library?
a) libm.so
b) libm.a
c) libc.a

A

libm.so

24
Q

What is the command to print the current shared library paths?
a) ldconfig -p
b) ldd –paths
c) printlibs

A

ldconfig -p

25
Q

What type of file is typically used to link shared libraries?
a) Symlinks
b) Binary
c) Plain text

A

Symlinks

26
Q

What is the primary difference between shared and static libraries?
a) Shared libraries are loaded at runtime, static libraries are included in the binary
b) Static libraries are larger than shared libraries
c) Shared libraries are faster

A

Shared libraries are loaded at runtime, static libraries are included in the binary

27
Q

Which environment variable can be used to debug shared libraries?
a) LD_DEBUG
b) LIB_DEBUG
c) LD_TRACE

A

LD_DEBUG

28
Q

What is the key benefit of using shared libraries?
a) Reducing memory and disk usage by sharing common code
b) Faster program execution
c) Improved security

A

Reducing memory and disk usage by sharing common code

29
Q

How can you manually remove an outdated shared library?
a) Delete the file and run ldconfig
b) Run ldd –remove
c) Delete the file and run libclear

A

Delete the file and run ldconfig

30
Q

Which command updates the symbolic links for shared libraries?
a) ldconfig
b) ln -s
c) liblink

A

ldconfig