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.

Monday, 25 September 2017

Linux Interview Question & Answer part-4


41) Command to check last runlevel

Ans who -r

42) What do you mean by File System?

Ans 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.

43) What is the requirement of udev daemon?

Ans Create and remove device nodes or files in /dev/ directory

44) What are block and character devices?

Ans Both the devices are present in /dev directory

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 (sda, sdb, sdc etc....)


Character device files talk to devices character by character.
Examples: - Virtual terminals, terminals, serial modems, random numbers (tty{0,1,2,3......})

45) How to Convert ext2 to ext3 File System?

Ans tune2fs -j /dev/{device-name}

46) File required to modify for setting up kernel parameters permanent

Ans /etc/sysctl.conf

47) Commands used to install, list and remove modules from kernel 

Ans Installing/adding a module: 
                                                    insmod mod_name
                                                    modprobe mod_name

        List installed modules :  lsmod
        Removing a module     : modprobe -r mod_name

48) How to create swap using a file and delete swap

Ans Adding swap :

dd if=/dev/zero of=/opt/myswap bs=1024 count=4

mkswap /opt/myswap

swapon -a

For adding this myswap at boot time, add following in /etc/fstab file:

/opt/myswap       swap     swap   defaults   0 0


Deleting Swap :

Run "swapoff /opt/myswap" command
Remove the entry from /etc/fstab file
Remove /opt/myswap file (using rm command)

49) What vmstat show

Ans vmstat (virtual memory statistics) is a computer system monitoring tool that collects and displays summary information about operating system memory, processes, interrupts, paging and block I/O



50) What is tmpfs File System

Ans Reference : http://en.wikipedia.org/wiki/Tmpfs

tmpfs is a common name for a temporary file storage facility on many Unix-like operating systems. It is intended to appear as a mounted file system, but stored in volatile memory instead of a persistent storage device. A similar construction is a RAM disk, which appears as a virtual disk drive and hosts a disk file system.


Everything stored in tmpfs is temporary in the sense that no files will be created on the hard drive; however, swap space is used as backing store in case of low memory situations. On reboot, everything in tmpfs will be lost.
The memory used by tmpfs grows and shrinks to accommodate the files it contains and can be swapped out to swap space.

51) What is the difference between screen and script commands?

Ans Screen is an screen manager with VT100/ANSI terminal emulation and used to take GNU screen session remotely or locally and while Script make typescript of terminal session

Screen : needs to be detached, should not be exited to access remotely/locally
Script : creates a file and store all the terminal output to this file

52) How can we check which process is assigned to which processor?

Ans Run "ps -elFL" and find out the PSR column which is showing the processor number to the process

53) How can we check vendor, version, release date, size, package information etc... of any installed rpm?

Ans) rpm -qi package-name , for example:

         rpm -qi ypbind-1.19-12.el5

No comments:

Post a Comment