Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Thursday 31 August 2017

===============MNC -Linux Interview Questions====== ============


Some Interview questions.
1) how to check the linux nic drivers
is installed or not?
2) how to check the Bonding
configured from the linux?
3) how to check hba card is working
or not ? how many hba cards are
installed how to check?
4) why NTP server is required?
without NTP server we can not work ?
5) how to upgrade RHEL from one
version to another version(ex :
RHEL5.4 to RHEL5.5) fully
upgradtion..?
6) which process will be the first
process kernal or initrd in when
booting process starts?
7) if INITTAB file will be deleted
what will happen? whether # prompt
will get it or not?
8) how to relocate the particular
service to another node in cluster
and how?
9) scenario based question:
1) if storage team assigned the LUN
and how to add it in to os without
Reboots the server?
2) some times LUN Is not visible
what are the steps you will make to
get the LUN from the OS end, what
and all you will troubleshoot?
10) what is the SMB file system
supports?
11) if your motherboard nic card got
faulty and what will be the impact
and how you will troubleshoot?
12) have you ever installed bios
firmware and how?

Linux interviews question...For L1

1) Linux Boot Process.
2) Linux Storage Lun Detection.
3) How to see WWID of a Lun.
4) Crash Dump Configuration.
5) Explain free command output.
6) How to view HBA WWN in linux.
7) How to check the Cluster Status.
8) How to failover a Resource Group.
9) Bonding Types.
10) Patching.
11) Linux Booting Process.
12) What is swap memory ?
13) What is Multipath ?
14) How to create a FTP user ?
15) How to build a Kernel ?
16) What is MBR Reset ?
17) How to add a scrpit to default run level ?
18) What is tune2fs ?
19) How to test NIC Failover ?
20) What is metadata and how to check the alternate metadata location ?
21) What in Context Switching ?
22) What are the states of a process ?
23) How to find the state of a process ?
24) What is a dirty page and how to find no of dirty pages ?
25) How find amount of memory used by the kernel ?
26) What is Dentry and inode ?
27) What is the difference between Swap and Virtual Memory ?
28) How to tune Virtual Memory ?
29) How to find load average of a server ?

30) What is a zombie ?

Linux interview question......

Q:1 What is the boot sequence of a linux server ?
Q:2 What is Hard disk driver or Hard disk module, are they different or same. Explain.
Q:3 How you will get the WWN number of HBA card installed in Linux
Q:4 How to check RHEL Version ?
Q:5 What is network bonding and different levels of bonding ?
Q:6 How to share a linux resource on windows machine ?
Q:7 How to scan newly assigned SAN’S LUN on Linux server without rebooting ?
Q:8 How to reset grub passwd and root passwd in linux ?
Q:9 What is journaling in linux ?
Q:10 What is difference between ext2 & ext3 and ext4 file system ?
Q:11 What are the steps to create LVM of newly created LUN ?
Q:12 How to see the tape device name in linux ?
Q:12 Power path Overview with software/driver installation on Linux servers ?
Q:13 What is RAID & different types of RAID levels ?
Q:14 What are the default ports used for smtp , ftp, ssh & samba ?
Q:15 How to calculate free size from free PE mentioned in VG Display ?
Q:16 LVM initialize on which stage in boot sequence ?
Q:17 What Grub and its different stages ?
Q:18 If we have a File data.txt, How you will give permission as below
Group Name – finance, write only
Users – tom & jack only read
Users – bond , read write execute.
Q:19 How to change network interface name ifcfg-eth0 to ifcfg-nic0
Q:20 How to re-size the file system ?
Q:21 How to preserve the permission on tar backup ?
Q:22 How to set default gateway in different ways ?
Q:24 How to work in 2 different files with vi editor, How to copy paste & cut in multiple files ?
Q:25 Difference between tar,cpio & dd backup ?
Q:26 How to increase size of swap in linux ?
Q:27 How to run a particular script in runlevel 3 ?
Q:28 What is meaning of “no_root_squash” in nfs ?
Q:29 What daemons run on nfs client ?
Q:30 How to check what are the driver installed in system ?
Q:31 What is the format /etc/fstab file ?
Q:32 From where the command ‘rpm -qa’ find the installed packages ?
Q:33 What is the function of syslog ?
Q:34 How you check the bottle neck of slow server ?
Q:35 What is the basic format of NFS mount ?
Q:36 Differnce b/w automount FS and NFS
Q:37 What is the role of boot loader(GRUB) Stage 1.5 ?
Q:38 Difference between super block and data block ?
Q:39 How to check the version of package ?
Q:40 What is Set UID and GID ?
Q:41 What is sticky bit and where to use ?
Q:42 Difference between LVM1 and LVM2 ?
Q:43 What is role of $0, $? and $# in shell scripting ?
Q:44 How to find the MX record of a domain from the command line ?
Q:45 What is the limitation of fdisk command & where to use parted command ?
Q:46 What are Logical steps for PXE Server setup in linux ?
Q:47 What is the role of %pre & %post in kickstart ?
Q:48 What are the different fields of crontab file & cron log file ?
Q:49 what is the difference between -U & -F option in rpm command ?
Q:50 How will supply/Reset password for 50 user without typing password again & again ?
Q:51 How will you get Module / Driver Information in linux ?
Q:52 How to check active ports in linux ?
Q:53 What is difference between sar and vmstat ?
Q:54 is it possible to boot the system without /boot partition OR deleted /boot partition ?
Q:55 How to change the complexity of password ?
Q:56 How to resolve if authentication failure (incorrect password ) ?
Q:57 How to change run level with in linux ?
Q:58 How will you load PAM module ?
Q:59 Is there a way to check the current system kernel for 32-bit kernel vs. 64-bit kernel?
Q:60 which file is responsible for forwarding (DNS) and what’s meaning of MX,PTR record ?
Q:61 What are Zombie process and how to check Zombie Processes ?
Q:62 How will you differentiate defunct and running processes in linux ?
Q:63 How to run job in background ?
Q:64 What is anacron & where to use anacron ?
Q:65 What is the role and size of MBR ?
Q:66 How to set grub boot loader password ?
Q:67 How to set the date in IST FORMAT from the command line ?
Q:68 How to check nfs version and release ?
Q:69 what is static and dynamic route in linux ?
Q:70 How to check whether oracle is installed or not in unix ?
Q:71 How to check which nfs share is mounted ?
Q:72 How to mount ISO file in linux ?
Q:73 what is LDS certificate ?
Q:74 How will you patch older kernel version in Linux machine ?
Q:75 What is the difference between yast & yast2 command ?
Q:76 How will you deactivate mouse in RHEL and which service is resposible for that ?
Q:77 What is ssh port forwarding ?
Q:78 How to patch linux servers using spacewalk ?
Q:79 What is the difference between RHN and Spacewalk ?
Q:80 How to recover deleted LVM partitions in linux ?
Q:81 How will you use trap and shift command in unix ?
Q:82 What are different components of Postfix Mail Server ?
Q:83 What is the use of SPF record & Domain Keys in mail server ?
Q:84 What is difference between NFS3 & NFS4 ?
Q:85 What is use of lsof command ?
Q:86 How will you check last week accessed files ?
Q:87 what is the use of ‘exec’ & ‘ok’ option in find command ?
Q:88 Give one exmaple of suid, sgid and Sticky bit ?
Q:89 How to reset failed login counts in linux ?
Q:90 What is the use of .netrc file in linux ?
Q:91 How to integrate Linux Servers with Microsoft Active Directory ?
Q:92 What is use of xargs with find command ?
Q:93 What are the different states of a process in linux/unix ?
Q:94 What is the use of ACLs in linux and how to implement ACLs ?
Q:95 What is the difference between useradd and adduser ?
Q:96 What is LVM Snapshot and use of lvm snapshot ?
Q:97 How to check yum repositry information & clear yum cache in linux ?
Q:98 How to create yum repository locally ?
Q:99 What is the role fencing in redhat cluster ?

Q:100 How to gracefully shutdown two node linux cluster in case of planned power outage ?

unix/linux System Admin Interview Questions And Answers-1


Q: - How are devices represented in UNIX?

All devices are represented by files called special files that are located in /dev directory.


Q: - What is 'inode'?

All UNIX files have its description stored in a structure called 'inode'. The inode contains info about the file-size, its location, time of last access, time of last modification, permission and so on. Directories are also represented as files and have an associated inode.
Q: - What are the process states in Unix?

As a process executes it changes state according to its circumstances. Unix processes have the following states:
Running : The process is either running or it is ready to run .
Waiting : The process is waiting for an event or for a resource.
Stopped : The process has been stopped, usually by receiving a signal.
Zombie : The process is dead but have not been removed from the process table.
Q: - What command should you use to check the number of files and disk space used and each user's defined quotas?

repquota 
Q: - What command is used to remove the password assigned to a group?

gpasswd -r
Q: - What can you type at a command line to determine which shell you are using?

echo $SHELL
Q: - Write a command to find all of the files which have been accessed within the last 30 days.
find / -type f -atime -30 > filename.txt
Q: - What is a zombie?

Zombie is a process state when the child dies before the parent process. In this case the structural information of the process is still in the process table.
Q: - What daemon is responsible for tracking events on your system?

syslogd 
Q: - What do you mean a File System? 

File System is a method to store and organize files and directories on disk. A file system can have different formats called file system types. These formats determine how the information is stored as files and directories.
Q: - Tell me the name of directory structure hierarchy for Linux

/root
/boot
/bin
/sbin
/proc
/mnt
/usr
/var
/lib
/etc
/dev
/opt
/srv
/tmp
/media  
Q: - What does /boot directory contains?

The /boot/ directory contains static files required to boot the system, such as the Linux kernel, boot loader configuration files. These files are essential for the system to boot properly. 
Q: - If some one deletes /boot directory from your server, than what will happen?

In that case your server will be in unbootable state. Your Server can’t boot without /boot directory because this directory contains all bootable files 
Q: - What does /dev directory contain?

The /dev directory contains all device files that are attached to system or virtual device files that are provided by the kernel.
Q: - What is the role of udev daemon?
The udev demon used to create and remove all these device nodes or files in /dev/ directory. 
Q: - What kind of files or nodes /dev/ directory contains and how do I access or see device files?

Block Device Files:-
Block device files talks to devices block by block [1 block at a time (1 block = 512 bytes to 32KB)].
Examples: - USB disk, CDROM, Hard Disk

# ls /dev/sd*
brw-rw----
1 root    
root      
8,
0 Mar 15  2009 sda
brw-rw----   
1 root    
root      
8,  
1 Mar 15  2009 sda1
brw-rw----   
1 root    
root      
8,  
2 Mar 15  2009 sda2
brw-rw----   
1 root    
root      
8,  
3 Mar 15  2009 sda3
brw-rw----   
1 root    
root      
8,  
4 Mar 15  2009 sda4
brw-rw----   
1 root    
root      
8,  
16 Mar 15  2009 sdb
Q: - Tell me the name of device file for PS/2 mouse connection.

/dev/psaux
Q: - Tell me the name of device file for parallel port (Printers).
/dev/lp0 
Q: - What does /etc/X11/ directory contains?

The /etc/X11/ directory is for X Window System configuration files, such as xorg.conf.
Q: - What does /etc/skell directory contains?

The /etc/skel directory contains files and directories that are automatically copied over to a new user's home directory when such user is created by the useradd or adduser command.
Q: - Tell me name of Linux File systems?
Ext2
Ext3

Ext4

unix/linux System Admin Interview Questions And Answers 2



Q: - What is the difference between ext2 and ext3 file systems?

The ext3 file system is an enhanced version of the ext2 file system.
The most important difference between Ext2 and Ext3 is that Ext3 supports journaling.
After an unexpected power failure or system crash (also called an unclean system shutdown), each mounted ext2 file system on the machine must be checked for consistency by the e2fsck program. This is a time-consuming process and during this time, any data on the volumes is unreachable.
The journaling provided by the ext3 file system means that this sort of file system check is no longer necessary after an unclean system shutdown. The only time a consistency check occurs using ext3 is in certain rare hardware failure cases, such as hard drive failures. The time to recover an ext3 file system after an unclean system shutdown does not depend on the size of the file system or the number of files; rather, it depends on the size of the journal used to maintain consistency. The default journal size takes about a second to recover, depending on the speed of the hardware.
Q: - Any idea about ext4 file system?

The ext4 or fourth extended filesystem is a journaling file system developed as the successor to ext3. Ext4 filesystem released as a functionally complete and stable filesystem in Linux with kernel version 2.6.28.
Features of ext4 file system:-
1. Currently, Ext3 supports 16 TB of maximum file system size and 2 TB of maximum file size. Ext4 have 1 EB of maximum file system size and 16 TB of maximum file size.
[An EB or exabyte is 1018 bytes or 1,048,576 TB]
2. Fast fsck check than ext3
3 In Ext4 the journaling feature can be disabled, which provides a small performance improvement.
4. Online defragmentation.
5. Delayed allocation
Ext4 uses a filesystem performance technique called allocate-on-flush, also known as delayed allocation. It consists of delaying block allocation until the data is going to be written to the disk, unlike some other file systems, which may allocate the necessary blocks before that step.
Q: - How we create ext3 file system on /dev/sda7 disk?

# mkfs –j /dev/sda7
Q: - Can we convert ext2 filesystem to ext3 file system?
Yes, we can convert ext2 to ext3 file system by tune2fs command.
                tune2fs –j   /dev/
Q: - Is there any data lose during conversion of ext2 filesystem to ext3 filesystem? 

No
Q: - How we will create ext4 file system?

# mke2fs -t ext4 /dev/DEV
Q: - Explain /proc filesystem?

/proc is a virtual filesystem that provides detailed information about Linux kernel, hardware’s and running processes. Files under /proc directory named as Virtual files. Because /proc contains virtual files that’s why it is called virtual file system.
These virtual files have unique qualities. Most of them are listed as zero bytes in size. Virtual files such as /proc/interrupts, /proc/meminfo, /proc/mounts, and /proc/partitions provide an up-to-the-moment glimpse of the system's hardware. Others, like the /proc/filesystems file and the /proc/sys/ directory provide system configuration information and interfaces.
Q: - Can we change files parameters placed under /proc directory? 

Yes
To change the value of a virtual file, use the echo command and a greater than symbol (>) to redirect the new value to the file. For example, to change the hostname on the fly, type:

echo www.nextstep4it.com > /proc/sys/kernel/hostname 
Q: - What is the use of sysctl command?

The /sbin/sysctl command is used to view, set, and automate kernel settings in the /proc/sys/ directory.
Q: - /proc/ directory contains a number of directories with numerical names. What is that?

These directories are called process directories, as they are named after a program's process ID and contain information specific to that process.
Q: - What is RAID?
RAID, stands for Redundant Array of Inexpensive Disks. RAID is a method by which same data or information is spread across several disks, using techniques such as disk striping (RAID Level 0), disk mirroring (RAID Level 1), and disk striping with parity (RAID Level 5) to achieve redundancy, lower latency, increased bandwidth, and maximized ability to recover from hard disk crashes.

Q: - Why should we use RAID?

System Administrators and others who manage large amounts of data would benefit from using RAID technology.

Following are the reasons to use RAID
-   Enhances speed
-   Increases storage capacity using a single virtual disk
-   Minimizes disk failure

Unix/Linux System Admin Interview Questions And Answers 3




Q: - What is the difference between hardware RAID and Software RAID?

The hardware-based RAID is independent from the host. A Hardware RAID device connects to the SCSI controller and presents the RAID arrays as a single SCSI drive. An external RAID system moves all RAID handling "intelligence" into a controller located in the external disk subsystem. The whole subsystem is connected to the host via a normal SCSI controller and appears to the host as a single disk.
Software RAID is implemented under OS Kernel level. The Linux kernel contains an MD driver that allows the RAID solution to be completely hardware independent. The performance of a software-based array depends on the server CPU performance and load.
Q: - What are the commonly used RAID types?

RAID 0
RAID 1
RAID 5
Q: - Explain RAID 0?

RAID level 0 works on “striping” technique. In RAID 0 the array is broken down into strips and data is written into strips. RAID 0 allows high I/O performance but provides no redundancy. RAID 0 Array Size is equal to sum of disks in array. If one drive fails then all data in the array is lost.
Q: - Explain RAID 1?

RAID Level 1 is based on Mirroring technique. Level 1 provides redundancy by writing identical data to each member disk of the array. The storage capacity of the level 1 array is equal to the capacity of one of the mirrored hard disks in a Hardware RAID or one of the mirrored partitions in a Software RAID. RAID 1 provides redundancy means good protection against disk failure. In RAID 1 write speed is slow but read speed is good.
Q: - Explain RAID 5?

RAID Level 5 is based on rotating parity with striping technique. RAID-5 stores parity information but not redundant data (but parity information can be used to reconstruct data). The storage capacity of Software RAID level 5 is equal to the capacity of the member partitions, minus the size of one of the partitions if they are of equal size. The performance of RAID 5 is based on parity calculation process but with modern CPUs that usually is not a very big problem. In RAID 5 read and write speeds are good.
Q: - Which kernel module is required for Software RAID?

“md” module
Q: - which utility or command is used for creating software RAID’s for RHEL5?

mdadm
Q: - Can we create software RAID during Linux installation?
Yes, we can create Software RAID during Linux Installation by “
Disk Druid”
Q: - What is the role of chunk size for software RAID?

Chunk size is very important parameter on which RAID performance based.
We know stripes go across disk drives. But how big are the pieces of the stripe on each disk? The pieces a stripe is broken into are called chunks.To get good performance you must have a reasonable chunk size.
For big I/Os we required small chunks and for small I/Os we required big chunks.
Q: - What is SWAP Space?

Swap space in Linux is used when the amount of physical memory (RAM) is full. If the system needs more memory resources and the RAM is full, inactive pages in memory are moved to the swap space. While swap space can help machines with a small amount of RAM, it should not be considered a replacement for more RAM. Swap space is located on hard drives, which have a slower access time than physical memory.
Q: - What are the steps to create SWAP files or Partition?

- Create swap partition or file
- Write special signature using “mkswap”
- Activate swap space by “swapon –a” command
- Add swap entry into /etc/fstab file
Q: - How you will create swap file of size 4 GB and explain swap file entry in /etc/fstab file?

Use “dd” command to create swap file.
dd if=/dev/zero  of=/SWAPFILE  bs=1024  count=4
mkswap /SWAPFILE
swapon –a
Entry into /etc/fstab file.

/SWAPFILE   swap   swap   defaults   0   0