Redhat troubleshooting interview questions

Redhat Linux troubleshooting interview questions
Redhat  troubleshooting interview questions

Redhat Linux troubleshooting interview questions

Name Some of the useful Linux troubleshooting commands 

dmesg    —   It is used for Kernel Buffer

vmstat   —  It is used to check virtual memory.

pidstat  — It is used to checks every PID status

mtr      — It is used to checks network latency

mpstat   — It is used to checks every CPU usages

iostat   —  It is used to checks disk status

free     — checks memory status

ifconfig — It is used to  checks network interfaces

SAR      — It is used to check complete system activity

ss       — It is used to Checks connection performance

iftop    — It is used to Check network performance

smem     — Checks memory allocated to per process

Which directory will hold the network configuration files?

ans- /etc/sysconfig/network.scripts

what are daemons are needed for SAMBA to handle its work?

ans- smb,nmb

what of the following configuration should be done to enable automounting on the client-side?

ans- autofs

How to check the IP address of the server?

Ans- commands like ifconfig, hostname -I,

How to check the default gateway of the server?

Ans- route -vn

What is ulimit?

Ans- Ulimit is a  type of descriptor were how many files that user can open


Disk space is full even after deleting a file of 6GB?

Ans- first check  df -Th and then lsof | grep deleted 

now kill the process with process id kill -9 <process id>

How to ssh to your server?

Ans- ssh -i <pam file>

          ssh -v -i <pam file>

What is the use of curl?

Ans - It is used to check the local webserver 

            #curl localhost

What is the use of the W command?

Ans- It is used for how many users are logged in and current load of the server, uptime of the server

How to kill all processes of any user?

Ans- pkill -9 -u `id -u username`

How to mount a disk permanently?

Ans-By using vim /etc/fstab you can mount disk by giving UUID and mount point.

#mount -a

How to check hidden files and how to create them?

Ans- ls -la you can check hidden files, and create a hidden file we 

use #touch .file

How to start the process at startup time?

Ans- vim /etc/rc.local you can start any process 

           service httpd start

            or you can use crontab -e

What does a nameless directory represent?

Ans- #ls -la 

      . it shows the current directory

     .. it shows the previous working directory

How do you check for free disk space?

Ans- df -Th 

          df -ik It shows the inode value

How do you check open ports on Linux Servers?

Ans- netstat -tunlp

How do you check the process of CPU usage?

Ans- By using the top command by pressing P you can check CPU usage.

How do you deal with mounting partitions?

Ans- cat /proc/mounts

          Or you can check with findmnt 

How do you find the use of a command you don’t know?

Ans- whatis <command name> 

How to check the  ACL is on a file?

Ans- getfacl  /path filename

What command do you use to check the attribute of a file?

Ans- lsattr /etc/fstab

 chattr +i /etc/fstab  it is used for creating  attributes 

What will happen if I remove execute permission from a directory?

Ans- mkdir /data

 ls -l 

 now if you remove permission by using 

chmod o-x /data

you cannot access the directory by any user

so you have to remove the permission by 

chmod a-x /data to access files by any user.

How to check if OS is running on Virtual or Physical Machine?

Ans- demidecode | grep -i vm

How to change the owner, group of a file in Linux?

Ans- chown karan:karan /tmp/file

What is the use of the NMAP command?

Ans- It is used to check open port in remote server

 Nmap -A

How to remove an INODE from the Linux File system?

Ans- First find the file by inode number by

 ls -il

kill -9 <process id>

Next Post »