Service Management

50. How to restart a service in RHEL 7, Oracle Linux 7, Centos 7

# systemctl restart service_name

51. How to completely disable a service from manually starting and at boot time.

# systemctl mask service_name

52. How to get and change the run level in RHEL 7

# systemctl get-default
# systemctl set-default run_level

53. Which command used to change the priority of a process

# renice

Managing Jobs

54. How to run a Job in the background?

some_job &

55. How to bring the background Job to the foreground?

# jobs

Run the command jobs then

# fg job_ID

Linux Signals

56. What will CTRL+C and CTRL+Z do?

CTRL+C Send a signal to interrupt (SIGINT) the foreground process; CTRL+Z will send a Suspend (SIGTSTP) the foreground process to background.

57. What is the signal number for CTRL+C


58. What is the signal number of CTRL+Z


Linux Security

59. Which command used to create ssh Key?

$ ssh-keygen

60. Full form for TLS?

Transport Layer Security (TLS)

61. How will you check the status of SELinux?

# sestatus

62. How to list the SELinux context of /var/www/html directory.

$ ls -lZ /var/www/html

If you are not good with SELinux it’s time to start right now by visiting How to start using SELinux or Security-Enhanced Linux

63. Command used to secure copy a file over the network.

$ scp

64. How to synchronize two directories securely in Linux?

$ rsync

Listing files | Locating files| Config files

65. How to list all hidden files in a directory?

$ ls -la

66. Which command will print the present working directory?

$ pwd

67. How to complete command in the terminal by auto-completion?


68. The default location of the Apache configuration file.

$ ls -lthr /etc/httpd/conf/httpd.conf

Read How to install Apache Web Server on Red Hat Enterprise Linux 7 and Variants for knowing more about Apache.

69. Default document root location of Apache Web server?


70. How to list the first 25 lines of a file.

$ head -25 filename

71. How to list the last 50 lines of a file.

# tail -50 /var/log/messages
# tail -n 50 /var/log/messages

72. How to create a soft link for file /home/linuxsysadmins/linux.txt under /var/www/html/

$ ln -s /home/linuxsysadmins/linux.txt /var/www/html/linux.txt

73. The default location of repository file in RHEL, Centos, Oracle Linux 7?

$ ls -ld /etc/yum.repos.d/

74. Which command is used to determine the path of an executable file?

$ which service_name

75. How to find and list all files owned by user “sysadmin” in his home directory.

# find /home/sysadmin/ -user sysadmin -f type -exec ls -lthr {} \;

76. Under which location wiki pages will be stored?


77. What will echo “some text” do?

Prints "some text" in screen.

78. How to search for a string starting with sysadmin in the file /etc/passwd?

$ grep "^sysadmin" /etc/passwd

Linux Schedulers

79. How to Schedule and list some task for user sysadmin in Linux?

# crontab -u sysadmin
# crontab -l -u sysadmin

80. How will you schedule a one-time task in Linux

# at

Linux Archive & Compress

81. Which command used to archive a file in Linux.


82. The single command used to archive and compress files or directories in Linux?

$ tar zcvf

Linux Boot | Kernel | System Information

83. How to know the kernel version of Linux?

# uname -r

84. What will happen after bootstrapping?

Starting with Init.    (0)         # RHEL 6.x
Starting with Systemd. (1)         # RHEL 7.x / 8.x

85. How to print full memory information?

$ cat /proc/meminfo

86. How to print full CPU information?

$ cat /proc/cpuinfo

87. How many run levels are in Linux?

Total 7 run levels, 0-6

88. What is the load average? and explain each section.

5, 10, 15 minutes CPU's are busy.

Linux Editors

89. In vi editor which command sets the number for all lines?

:set nu
:set number

90. How to exit vi editors in Linux?


91. Which command will be used to count the total number of lines, words, and characters in a file?

$ wc

SSH Configuration

92. Default port number of SSH?


93. How to ssh into a server with IP address using user sysadmin

$ ssh sysadmin@

Linux Interview Questions on Miscellaneous

94. The maximum allowed characters in a filename in Linux?


95. How “anaconda-ks.cfg” will be created under /root ?

Anaconda installer will create “anaconda-ks.cfg” after completing with post installations.

96. The command/package used to create an iSCSI server.

# targetcli

97. What is Samba and why it used?

Samba used to connect with Windows machines and used as a file-sharing protocol and print service.

98. How to set a variable in shell scripting?

var=uname -a

99. How frequent /tmp gets cleared automatically?

10 days old

100. How to display all currently running processes on any Linux system.

$ ps -ef

Hope this post helps you for preparing your admired Linux admin role. Read all entry-level Linux Interview questions to prepare yourself before appearing in any interview.


Please enter your comment!
Please enter your name here