Posted by: Mangesh_Linux_Administrator | July 20, 2010

Interview2


What is the default Window system / Windows manager used in Linux?
X.org

What command is used to list the contents of directory?
ls
ls -l

What command is used to list the top 10 files / directories size wise?
for X in $(du -s * | sort -nr | cut -f 2); do du -hs $X ; done

What command is used to display a list of currently running processes?
ps
top
pstree
pgrep
/proc file system

What is a login shell?
A program get executed when a user logs into UNIX box. E.g. bash, sh, ksh, csh

What is UID?
User identification number which is assigned to each UNIX / Linux user; it may or may not be unique (unique number is recommended to avoid security related issues). UID and user relationship defined in /etc/passswd file.
man id
man users
man groups

What GID? What is EUID? What SUID? What is RUID?
Linux > More on USER ID, Password, and Group management
Understanding /etc/passwd file format
Understanding /etc/ shadow file

Explain Unix User security concept
Permissions – chmod and chown
User groups – group management – user management
Read su, sudo man page

What PID?
Process identification number; use ps command to see PID. It is a number used by Unix kernels and Windows operating systems to identify a process.

Explain process ID zero and process ID 1?
All the idle task has process ID zero, and never exits.
The init process, with process ID 1, which does nothing but wait around for its child processes to die. Usually started for /etc/inittab

Explain wheel group usage along with an example?
man su

What command is used to check a file system for errors?
fsck
fsck.ext3
fsck.nfs
fsck.ext2
fsck.vfat
fsck.reiserfs
fsck.msdos

Is Linux / UNIX file system case sensitive? Give one example
Yes, test.txt and TEST.txt are two different files

What file contains the list of drives that are mounted at boot?
/etc/fstab – Linux / Other UNIX version
/etc/vfstab – Solaris UNIX

Explain the usage of the fourth field in /etc/fstab?
It is formatted as a comma separated list of options. Read mount command man page for all the option.

What is /etc/inittab file? In what file is the default run level defined?
System V init examines the ‘/etc/inittab’ file for an ‘initdefault’ entry, which tells init whether there is a default runlevel. init is the program on Unix that spawns all other processes. It runs as a daemon and typically has PID 1.
man init
cat /etc/inittab
Common runlevle values on RHEL
0. Halt
1. Single user mode
6. Reboot
3. Default text
5. Default GUI

To check the current runlevel:
who -r
runlevel

What command is used to get help about command? What command is used to read manual page for a given command?
info command-name
man command-name
command-name -h
command-name –help

What command form or symbol used to redirect output to a file?
Use the > symbol
command-name > output.txt
Use the < symbol to read input from a file

What is POSIX? Name 2 POSIX-oriented operating systems?
Portable Operating System Interface is the collective name of a family of related standards specified by the IEEE to define the application programming interface (API). HP-UX, Solaris, AIX etc

Linux and BSD not certified as POSIX but conform to standard.

Explain Raw device and command s to configure Raw device
Block device file that allows accessing a storage device such as a hard drive directly. For example /dev/hda. Use commands
mknod
fdisk
mkfs
mkfs.ext3

Explain Unix domain socket
Unix Sockets
MySQL and many programs uses domain socket to make client / server communication. Usually fast as compare to TCP/IP

Secify seciaal usage for each one of the following file
/dev/null – Send unwanted output
/dev/random – Random number generation
/dev/zero – Cache or Destroy data on a partition – dd if=/dev/zero of=/dev/sda98

What is the default Window system / Windows manager used in Linux?

Code:
X.org
What command is used to list the contents of directory?

Code:
ls
ls -l
What command is used to list the top 10 files / directories size wise?

Code:
for X in $(du -s * | sort -nr | cut -f 2); do du -hs $X ; done
What command is used to display a list of currently running processes?

Code:
ps
top
pstree
pgrep
/proc file system
What is a login shell?
A program get executed when a user logs into UNIX box. E.g. bash, sh, ksh, csh

What is UID?
User identification number which is assigned to each UNIX / Linux user; it may or may not be unique (unique number is recommended to avoid security related issues). UID and user relationship defined in /etc/passswd file.

Code:
man id
man users
man groups

What GID? What is EUID? What SUID? What is RUID?
Linux > More on USER ID, Password, and Group management
Understanding /etc/passwd file format
Understanding /etc/ shadow file

Explain Unix User security concept
Permissions – chmod and chown
User groups – group management – user management
Read su, sudo man page

What PID?
Process identification number; use ps command to see PID. It is a number used by Unix kernels and Windows operating systems to identify a process.

Explain process ID zero and process ID 1?
All the idle task has process ID zero, and never exits.
The init process, with process ID 1, which does nothing but wait around for its child processes to die. Usually started for /etc/inittab

Explain wheel group usage along with an example?

Code:
man su
What command is used to check a file system for errors?

Code:
fsck
fsck.ext3
fsck.nfs
fsck.ext2
fsck.vfat
fsck.reiserfs
fsck.msdos
Is Linux / UNIX file system case sensitive? Give one example
Yes, test.txt and TEST.txt are two different files

What file contains the list of drives that are mounted at boot?
/etc/fstab – Linux / Other UNIX version
/etc/vfstab – Solaris UNIX

Explain the usage of the fourth field in /etc/fstab?
It is formatted as a comma separated list of options. Read mount command man page for all the option.

What is /etc/inittab file? In what file is the default run level defined?
System V init examines the ‘/etc/inittab’ file for an ‘initdefault’ entry, which tells init whether there is a default runlevel. init is the program on Unix that spawns all other processes. It runs as a daemon and typically has PID 1.

Code:
man init
cat /etc/inittab
Common runlevle values on RHEL

Code:
0. Halt
1. Single user mode
6. Reboot
3. Default text
5. Default GUI
To check the current runlevel:

Code:
who -r
runlevel
What command is used to get help about command? What command is used to read manual page for a given command?

Code:
info command-name
man command-name
command-name -h
command-name –help

What command form or symbol used to redirect output to a file?
Use the > symbol

Code:
command-name > output.txt
Use the < symbol to read input from a file

What is ssh? Specify ssh command syntax to execute command over a TCP/IP network?
SSH is Application layer protocol which allows data to be exchanged over a secure channel between two computers.
Sshh – Wikipedia, the free encyclopedia

Code:
ssh user@remote.box command-name
Explain steps for password less login? How do you set-up SSH with DSA / RSA public key authentication?
Howto Linux / UNIX setup SSH with DSA public key authentication (password less login)

Explain BSD-style init?
Read rc man page. There are no runlevels; the ‘rc’ file determines how init is to be run.
Runlevel – Wikipedia, the free encyclopedia

Explain Sys-V style init?
Read init man page
Runlevel – Wikipedia, the free encyclopedia

Explain Unix philosophy
Unix philosophy description by The Linux Information Project (LINFO)

What is POSIX? Name 2 POSIX-oriented operating systems?
Portable Operating System Interface is the collective name of a family of related standards specified by the IEEE to define the application programming interface (API). HP-UX, Solaris, AIX etc

Linux and BSD not certified as POSIX but conform to standard.

Explain Raw device and command s to configure Raw device
Block device file that allows accessing a storage device such as a hard drive directly. For example /dev/hda. Use commands

Code:
mknod
fdisk
mkfs
mkfs.ext3
Explain File descriptor
File descriptor – Wikipedia, the free encyclopedia

Explain Unix file types
Directory
Pipes
Fifo
Symbolic link
Named pipe
Socket
Device file
Door
Regular file

Explain inode, superblock and hard links
Understanding UNIX / Linux file system

Explain Unix domain socket
Unix Sockets
MySQL and many programs uses domain socket to make client / server communication. Usually fast as compare to TCP/IP

Explain UNIX software pipeline concept
See shell or bash man page

Code:
cat /etc/passwd | grep username
mount | grep cdrom
Explain XYZ Unix daemons
Where XYZ can be any one of the following:

Code:
init
httpd
dhcpd
lpd
nfsd
ntpd
syslogd
ypbind
ftpd
telnetd
sshd
named
Explain udev in Kernel 2.6?
udev – Wikipedia, the free encyclopedia

Explain Process management and related commands

Explain Memory management and related commands

What is Open Group standards?

Secify seciaal usage for each one of the following file
/dev/null – Send unwanted output
/dev/random – Random number generation
/dev/zero – Cache or Destroy data on a partition – dd if=/dev/zero of=/dev/sda98

Explain Linux Exec Shield
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Categories

%d bloggers like this: