Blog

Linux Interview Questions

Email This Post

Last Updated: 17.04.2018

If you're looking for Linux Interview Questions for Experienced or Freshers, you are at right place. There are a lot of opportunities from many reputed companies in the world. According to research Linux average salary ranges from $67,765 to $91,824. So, You still have the opportunity to move ahead in your career in Linux Development. Mindmajix offers Advanced Linux Interview Questions 2018 that helps you in cracking your interview & acquire dream career as Linux Developer.

Linux Vs Windows

Linux Interview Questions

LINUX

WINDOWS

Linux is available for free

Windows has to be bought

It is an open source OS

It is not open source OS

One can customize Linux

No customizations available

Provides high level security

Cannot defend virus and malware attacks

Primary partitionig and logical partitioning available to boot

Booting available while primary partitioning only

Back Slash separates directories

Forward slash separates directories

File names are case particular

Irrespective of case while naming files

Q. What is the difference between Linux and UNIX?

A. UNIX - Only big companies are allowed to use the UNIX copyright and name. IBM AIX, Sun Solaris, and HP-UX all are UNIX operating systems. Most UNIX operating systems are commercial in nature.

Linux is a Unix clone. But if you consider Portable Operating System Interface (POSIX) standards then Linux can be considered as UNIX.

A. By default, Linux and UNIX come with system initialization script but they are located in different directories:

HP-UX – /sbin/init.d

AIX – /etc/rc.d/init.d

Linux – /etc/init.d

Q. What are the some UNIX Operating System Names?

A. Some of the most used UNIX operating systems are:

HP-UX

IBM AIX

Sun Solairs

Mac OS X

IRIX

Q. What are the Linux Distribution (Operating System) Names?

A. Here are the some Linux operating system names:

Redhat Enterprise Linux

Fedora Linux

Debian Linux

Suse Enterprise Linux

Ubuntu Linux

Q. What are some common things between Linux & UNIX?

A. Both Linux and UNIX share many common applications such as:

GUI, file, and windows managers (KDE, Gnome)

Shells (ksh, csh, bash)

Various office applications such as OpenOffice.org

Development tools like perl, php, python, GNU c/c++ compilers

Posix interface

Learn how to use Linux, from beginner basics to advanced techniques, with online video tutorials taught by industry experts. Enroll for Free Linux Training Demo!

Q. What does curl command do in Linux?

A. In Linux, curl command is used to test an application's endpoint or connectivity to an upstream service endpoint. curl command will be used to determine if the application can reach another service, like a database, or checking if your service is healthy.

curl Example:

$ curl -I -s myapplication:5000
HTTP/1.0 500 INTERNAL SERVER ERROR

This example through an exception saying that your application can't reach your server.

In the above command, the -I option shows the header information and the -s option silences the response body.

Q. What is ls command and what it does?

A. ls lists files in a directory. In Linux System admins and developers uses this command very often. In containers, ls command can help determine your container image's directory and files.

A. tail command displays the last part of a file. Generally, users don't need every log line to troubleshoot. Instead, you want to check what your logs say about the most recent request to your application.

tail Example:

$ tail -n 100 /var/log/httpd/access_log

Q. What is cat command in Linux?

A. In Linux cat command concatenates and prints files. Users might issue cat to check the contents of your dependencies file or to confirm the version of the application that you have already built locally.

cat Example:

$ cat requirements.txt
flask
flask_pymongo

Q. What is grep command in Linux?

A. grep searches file patterns. If you are looking for a specific pattern in the output of another command, grep highlights the relevant lines. Use this grep command for searching log files, specific processes, and more.

A. ps command displays process status. Use this ps command to determine a running application or confirm an expected process.

ps Command Example:

$ ps -ef

$ ps -ef | grep tomcat

Q. What is env command in Linux?

A. env command allows users to set or print the environment variables. During troubleshooting, users can find it useful for checking if the wrong environment variable prevents your application from starting.

Join MindMajix Network

Mindmajix - Online global training platform connecting individuals with the best trainers around the globe. With the diverse range of courses, Training Materials, Resume formats and On Job Support, we have it all covered to get into IT Career. Instructor Led Training - Made easy.