In this article, we’ve included 10th set of 10 basic Linux Interview Questions and detailed answers that will help candidates prepare for the Linux interview and get the best job in the IT industry.
These Linux interview questions and answers will be useful for both freshers and experienced professionals at any level.
Some of the questions are for advanced Linux professionals, however, beginners or fresher can easily understand the answers and explanations described below.
In interactive mode, the shell expects input from the user to execute commands. This is a common behavior that every Linux administrator is familiar with. This is called interactive mode because the shell interacts with the user to execute any commands in the shell.
A great example of a non-interactive mode in Linux is the shell script, which in most cases does not require user input, so running the shell script is always a non-interactive shell.
The below table describes the basic difference between Bash and Dos.
S.No | BASH | DOS |
---|---|---|
1 | BASH commands are case sensitive so make sure that you have to input the commands with care. | DOS commands are not case sensitive. |
2 | In BASH ‘/’ character is a directory separator and ‘\’ is an escape character. | In DOS, ‘/’ is a command argument delimiter and ‘\’ is a directory separator. |
3 | BASH follows no convention in naming files. | DOS follows a convention in naming files, which is 8 character file name followed by a dot and 3 character for the extension. |
SSH, or Secure Shell, is a protocol used to securely log into remote systems over an insecure network. This is the most common method that are used now a days to access remote Linux servers.
When you connect to a Linux system for the first time, SSH prompts you to accept the fingerprint of the machines to successfully establish the connection.
Basic Syntax:
ssh [remote_host or IP]
To connect a remote system with a specific username use the following format.
ssh remote_username@remote_host
Linux user space refers to all kinds of utilities, programming languages, and graphical tools that are installed in an operating system and lives outside of the kernel.
These are user space applications where normal user processes run and processes running under the user space have access only to a limited part of memory whereas kernel has access to all of the memory.
Kernel space is strictly reserved for running a privileged operating system kernel and their codes, kernel extensions, and most device drivers.
The role of the kernel is to manage applications running in the user space from messing with each other, and the system. Kernel space can be accessed by user processes only through the use of system calls.
System calls are requests in a Unix-like operating system by an active process for a service performed by the kernel, such as input/output (I/O) or process creation.
A system call is a procedure that provides the interface between a process and the operating system to perform varies operation in the system.
A process in Linux can be in one of the following states:
You can use the ps command or the top command to find information about process status in Linux. The status of a process tells you what the process is currently doing on the system.
ps command output:
top command output:
top -c top - 17:24:03 up 5:59, 2 users, load average: 0.53, 1.01, 1.06 Tasks: 330 total, 3 running, 327 sleeping, 0 stopped, 0 zombie %Cpu(s): 5.1 us, 1.6 sy, 0.0 ni, 92.5 id, 0.0 wa, 0.0 hi, 0.8 si, 0.0 st MiB Mem : 15831.25+total, 4015.715 free, 5254.238 used, 6561.301 buff/cache MiB Swap: 2048.332 total, 2048.332 free, 0.000 used. 8100.496 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 3760 linuxge+ 20 0 4169776 874676 360116 R 22.77 5.396 15:42.15 /usr/lib64/firefox/firefox 6255 linuxge+ 20 0 3196856 362176 170376 R 19.14 2.234 2:24.17 /usr/lib64/firefox/firefox -contentproc -childID 12 -isForBrowser -prefsLen 9691 -prefMapSize 221954 -parentBuildID 202+ 8296 linuxge+ 20 0 3390672 588472 324076 S 2.640 3.630 1:01.03 /usr/lib64/firefox/firefox -contentproc -childID 15 -isForBrowser -prefsLen 9901 -prefMapSize 221954 -parentBuildID 202+ 2520 linuxge+ 9 -11 2202496 14992 10564 S 1.980 0.092 1:42.66 /usr/bin/pulseaudio --daemonize=no --log-target=journal 4706 linuxge+ 20 0 3206380 320800 160560 S 1.320 1.979 1:44.72 /usr/lib64/firefox/firefox -contentproc -childID 8 -isForBrowser -prefsLen 8946 -prefMapSize 221954 -parentBuildID 2021+ 5683 linuxge+ 20 0 3516176 718524 146340 S 1.320 4.432 13:12.17 /usr/lib64/firefox/firefox -contentproc -childID 10 -isForBrowser -prefsLen 9230 -prefMapSize 221954 -parentBuildID 202+ 8734 linuxge+ 20 0 585412 80948 68452 S 1.320 0.499 0:06.72 /usr/lib/gnome-terminal-server 2536 linuxge+ 20 0 4145196 442040 265444 S 0.990 2.727 5:26.96 /usr/bin/gnome-shell
The load average is the average system load on a Linux system for a defined period of time. It is calculated based on the compute resources usage such as CPU, Memory, disk, and other resources.
You can find the load average of your Linux system using the top or the uptime command. It shows the system load over a period of one, five, and 15 minutes.
top command output:
uptime command output:
uptime
17:54:10 up 6:29, 2 users, load average: 0.94, 1.01, 1.08
In this guide, we’ve included the most frequently asked 10th set of 10 basic Linux Interview Questions and detailed answers for your reference purpose and we hope it will be very useful.
If you have any questions or feedback, feel free to comment below.
Cron is a command-line job scheduler available on Linux operating systems that allows users to…
In computing, there are two types of IP addresses, IPv4 and IPv6. By default, IPv6…
A tarball is commonly known as a TAR file, short for tape archive, which is…
A tar archive is a file that stores a collection of directories and files, also…
On Linux, you can quickly find out how LUNs are mapped to the underlying OS…
Keeping your Ubuntu system up-to-date is critical to ensuring a system's stability and security. This…
This website uses cookies.