11 min to read
If you’re a developer, sysadmin, or just curious about Linux, this list is for you. It contains all the common questions asked in an interview for a Unix-like system administration or programming position that relates to Linux.
Linux is a Unix-like operating system that has been around for decades and was originally based on the Unix kernel. Linux is an open-source operating system, which means it is freely available and can be modified by anyone with the knowledge. And it’s not just for your desktop computer – Linux runs servers around the world.
Linux is used to power everything from our Android smartphones to web servers that keep everyday websites up and running. Linux powers supercomputers, the enterprise data centers of the world’s top tech companies, and everything in between. And even though this operating system might not be as well known as industry heavyweight Windows, Linux has been around for more than 27 years.
In the world of Linux, there are a set of commands that you will need to know in order to interact with your system. We are always going to talk about the most important commands, and how they work.
Linux, however, used to be the butt of jokes among the software elite. But today, Linux is at the forefront of innovation in operating systems. The Silicon Valley giants such as Google and Facebook use Linux for their clusters and data centers. So what happened?
As with any operating system, Linux administration is a substantial topic. It has the advantage of being open source and free to use, but like all computer systems, it can be difficult to learn how to administer it.
Linux generally consists of five basic elements or components as given below:
LILO means Linux Loader is a boot loader that is used for the Linux operating system. Most of the Linux Operating systems use LILO, to boot the operating system into the main memory to start the operations.
LVM stands for Large Volume Management, it is a storage management device. Users can create, resize, and delete LVM partitions. It increases abstraction, flexibility, and control. LVM is used to gather existing storage devices into the group and allocate logical units.
Different modes of Linux network bonding
Details mentioned below
Service | Port |
SMTP | 25 |
DNS | 53 |
FTP | 20(Data Transfer) 21(Connections Established) |
DHCP | 68(dhcp client), 67(DHCP server) |
SSH | 22 |
Squid | 3128 |
rm command: The rm command is used to remove the directory or file specified on the command line. You need to be careful while removing any file or directory.
Syntax:
rm filename—
Command | Description |
rm filename | Removes single file. |
rm filename1, filename2, filename 3 | Removes multiple files. |
rm * .pdf | Removes all pdf files in the current directory. |
rm -i filename(s) | -i mean to confirm before deleting the file |
rm -i filename(s) | Removes files without prompting |
rm -fv *.txt | Remove all .txt files in the current directory without prompting |
The rmdir is used to remove each directory specified on the command line.
Syntax:
~rmdir [-p] [-v | –verbose] [–ignore-fail-on-non-empty] directories
It is a form of redirection that is used in Linux, it is used to combine more than two commands and the output of one command can take as input to the next command.
Syntax: command_1 | command_2 | command_3 | …. | command_N
It is a process whose execution is completed but even the information exists in the process table. It occurs for the child process because the parent process needs to read the child process status. Once it is completed using the wait system call, then the zombie process is removed from the process table. This is known as Zombie Process.
Features of Stateless Linux Server
Use this command: timeout 10s ./script.sh
# Restart every 30 minutes
while true; do timeout 30m ./script.sh; done
Use this command to do:
while inotifywait -e close_write document.tex
do
make
done
use these commands:
Use this command: readlink -f file.txt
2. ulimit -Sv unlimited # Remove limit
Linux | Windows |
Linux is available for FREE | It is paid software |
It is an Open-Source operating system | It is not an open-source OS |
Linux customization is possible | No customizations are available |
It provides high-level security | Can’t defend virus and malware attacks unless until it is paid |
Primary partitioning and logical partitioning available to boot | Booting is available while primary partitioning only |
BackSlash separates directories | The forward slash separates directories |
File names are case particular | Irrespective of the case while naming files |
Users can use the df command to troubleshoot disk space issues. Here df stands for display-free disk space.
df Command Example:
df -h
du command in Linux is used to retrieve more detailed information about which files use the disk space in a directory.
du Command Example:
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.
env Command Example:
$ env
PYTHON_PIP_VERSION=9.0.1
HOME=/root
DB_NAME=test
PATH=/usr/local/bin:/usr/local/bin
LANG=C.UTF-8
PYTHON_VERSION=3.4.6
PWD=/
DB_URI=mongodb://database:27017/test
The ps command displays the 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
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.
grep Example:
$ cat tomcat.log | grep org. apache.Catalina. startup.Catalina. start
12-Jan-2018 17:08:35.542 INFO [main] org. apache.Catalina. startup.Catalina.start Server startup in 681 ms
In Linux cat command concatenates and prints files. Users might issue a 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
The tail command displays the last part of a file. Generally, users don’t need every logline 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
Linux is an open-source operating system, nowadays it is rapidly growing in the technology market. We have a few reasons why Linux is more secure than other OS.
In Linux, the Ctrl+Alt+Del key is used to restart the computer, and it does not display any confirmation message before rebooting the system.
Difference between Bash and Dos
Bash | Dos |
Commands are case sensitive | commands are not case sensitive |
Backward slash(/) represents directories separator | ‘/’ represents command arguments |
Forward slash ‘’ represents escape character | ‘’ represents directories separator |
Does not follow conventions naming in files | Follow naming convention in files |
Following are the features of the Linux Operating System
We are many reasons, but few important reasons are listed. Following are
We have so many Linux Distributors, among them, we discuss a few important ones.
Linux is a type of operating system that runs on any computer effectively. Linux is not just free, it’s also open-source, which means that it has no restrictions on how its code can be used or modified.
We all know that Linux is software that helps one use and understand computers better. This article talks about how to carry out an interview with a person who is knowledgeable in Linux. Linux has been known for its stability and speed. A Linux interview question may be a good idea to help you decide whether it is the right operating system for your needs.
These Linux interview questions and answers article will give you some insight into what to expect when interviewing for a Linux position. You’ll find out more about the software, the history of the operating system, and what kind of certifications you might be able to get if you decide to go down that path!
Linux provides many advantages over other operating systems: Open-source software is available for everyone to contribute, modify, and enhance the source code. It is also available for users to download and use for free. Linux is less vulnerable and more secure than Windows operating systems.
One of the most attractive elements offered by the OS is its price – totally free. Users can download current versions of hundreds of distributions. Businesses can supplement the free price with a support service if needed.
One of the big advantages of most Linux distros isn't just that they are free and open source - so are most of the software applications used for Linux. While some business-orientated software does come with a cost, for most home users most of what they will need won't be.
Tags
Are you looking for something specific?
We understand that hiring is a complex process, let’s get on a quick call.
Share
11 comments