Linux Interview Answers

1 min
16
0
0
Published on updated on
  1. Explain the difference between a static library and a dynamic library?

    Static library is linked into the executable, while a dynamic library (or shared object) is loaded while the executable has started.

  2. How do you create a static library?

    If you have a collection of object (.o) files, you can do it by running ar command. Generally a static library has a .a extension, and you can link it into an executable by providing -l libraryname to gcc.

  3. Where should the developed libraries be installed on the system?

    GNU recommends /usr/local/bin for binaries and /usr/local/lib for libraries.

  4. What is LD_LIBRARY_PATH?

    It’s an environment variable that lists all the directories which should be searches for libraries before the standard directories are searched.

  5. How do you create a shared library?

    Create the object file with -fPIC for position-independent code, then run gcc with -shared option.

  6. How do you install a shared library?

    Run ldconfig in the standard directory that it’s installed in.

  7. What does ldd do?

    It shows a list of installed shared libraries.

  8. How do you dynamically load a library in your app?

    Use dlopen()

  9. What does nm command do?

    It reports the list of symbols in a given library.

Click on the link to search and apply for Linux jobs

Answers sourced from www.techinterviews.com

Continue reading around the topics :

Comment

In the same category

The best IT jobs for introverts IT Career Advice
Introverts can thrive in IT jobs that require focus, problem-solving, and independent work. There are plenty of roles perfect for those who prefer working behind the scenes.
4 min
data jobs in the UK IT Career Advice
Data jobs in the UK are in high demand, with roles in data science, engineering, and analysis offering excellent career stability. From junior data analysts to senior roles like chief data officer, these positions provide clear growth opportunities with salaries ranging from £25,000 to £100,000+
3 min
Preparing for your Junior Data Analyst interview IT Career Advice
Interviews for a Junior Data Analyst role can be challenging, but preparation is key. Be ready to discuss tools like Excel, SQL, and Python, and share how you've used them in projects. This guide covers key questions and tips to help you feel confident.
4 min

Connecting Tech-Talent

Free-Work, THE platform for all IT professionals.

Free-workers
Resources
About
Recruiters area
2024 © Free-Work / AGSI SAS
Follow us