You are on page 1of 23

Samba Interview Questions & Answers part 1

Q: – Which SELinux security context used for SAMBA ?


samba_share_t
Q: – what is nmbd daemon?
This daemon handles all name registration and resolution requests. It is the primary vehicle involved in
network browsing. It handles all UDP-based protocols. The nmbd daemon should be the first command
started as part of the Samba startup process.
Q: – What is smdb daemon?
This daemon handles all TCP/IP-based connection services for file- and print-based operations. It also
manages local authentication. It should be started immediately following the startup of nmbd.
Q: – My clients are getting the error message that the Disk is Full when trying to print to my Samba
server, but there is plenty of space. What is the problem?
If smbd is unable to write the spooled file to the directory defined by the path parameter for a printer if the
write permission were denied, for example it would respond to the client with the message, Disk is Full.
Samba will also return this error message if the amount of free disk space in the spool directory has fallen
below the value specified by the min print space parameter.
Q: – When I click on my Samba server in the network neighborhood, I am continually prompted for
a password to the IPC$ share no matter what I enter.
The Windows client is attempting to use encrypted passwords. However, the Samba server is configured to
support only clear-text passwords. You should either enable encrypted passwords on the server or enable
clear-text passwords on the Windows client.
Q: – On which ports SAMBA server works ?
– UDP port 137 for netbios-ns, the NETBIOS Name Service
– UDP port 138 for netbios-dgm, the NETBIOS Datagram Service
– TCP port 139 for netbios-ssn, the NETBIOS session service
– TCP port 445 for microsoft-ds, the Microsoft Domain Service
Q: – Why is security = domain better than security = server?
There are three reasons why security = domain is better. The first is because this method enables the Samba
server to participate in domain trust relationships. This is impossible with server-level security. The second
reason is that, under server-level security, each smbd process must keep an open connection with the
authentication server. This can drain a Windows NT PDC quickly. Under domain-level security, this
connection is maintained only long enough to perform the validation, thus conserving valuable resources.
The final reason is that, as a domain member, the Samba server has access to much more information about
user accounts, which can be used to automate the creation and deletion of user accounts upon demand.
Q: – What is winbindd daemon?
This daemon should be started when Samba is a member of a Windows NT4 or ADS domain. It is also
needed when Samba has trust relationships with another domain. The winbindd daemon will check the
smb.conf file for the presence of the idmap uid and idmap gid parameters. If they are found, winbindd will
use the values specified for UID and GID allocation. If these parameters are not specified, winbindd will
start but it will not be able to allocate UIDs or GIDs.
Q: – What are the Secrity or Authentication Mode for SAMBA server?
ADS
DOMAIN
SERVER
USER
SHARE
Samba Interview Questions & Answers part 2
Q: – How to Manually Create Machine Trust Accounts ?
/usr/sbin/useradd -g machines -d /var/lib/nobody -c "machine nickname" -s /bin/false machine_name$
passwd -l machine_name$
Q: – Explain "force group" parameter used in smb.conf?
It will define the group id to be used for all file access in the place of the user’s primary group.
Q: – Explain "force user" parameter used in smb.conf?
It will define the user id to be used for all file access.
Q: – What are the SAMBA server Types ?
– Primary Domain Controller (PDC)
– Backup Domain Controller (BDC)
– ADS Domain Controller

Q: – Can i set empty password for samba user?


yes, If you want to set the value to an empty password, you must change
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXX
to
NOPASSWORDXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXX
in your smbpasswd file.
Note: – if you have edited the smbpasswd file by hand, make sure that the LAN Manager and NT password
fields contain exactly 32 characters, no more and no fewer. If these fields do not have exactly 32 characters,
Samba will not be able to correctly read the entry.
or You can modify by "smbpasswd" command.
smbpasswd -n USER_NAME
Also you have to set the null passwords parameter to yes in the [global] section of smb.conf:
null passwords = yes
Q: – Does Samba support PAM?
Yes

Q: – What is role of "NTLM"?


The challenge/response authentication protocol available to Windows clients and servers for validating
connection requests.
Q: – Which protocol SAMBA server uses ?
SMB, which stands for Server Message Block, is a protocol for sharing files, printers, serial ports, and
communications abstractions such as named pipes and mail slots between computers.

Samba Interview Questions & Answers part 3


Q: – How Does a Workstation find its Domain Controller?
There are two different mechanisms to locate a domain controller: one method is used when NetBIOS over
TCP/IP is enabled and the other when it has been disabled in the TCP/IP network configuration. Where
NetBIOS over TCP/IP is disabled, all name resolution involves the use of DNS, broadcast messaging over
UDP, as well as Active Directory communication technologies.
Q: – Can Samba be a member of more than one workgroup at the same time?
No, Samba can be a member of only one workgroup.
Q: – What is SWAT?
SWAT is GUI Based administration tool for samba server.
Q: – Explain "write list" parameter used in smb.conf?
A list of users and/or groups that should be given write access even if the read only parameter has been
enabled.
Q: – I am trying to use SWAT, but I keep getting the message There was no response. The server
could be down or not responding. What is the problem?
The most likely cause is that SWAT is not listening to connections, or you have used the wrong URL in
trying to connect to SWAT. SWAT usually lives behind port 901, so the URL you should use is
http://ID_ADDRESS_OF_SERVER:901/
Q: – Can Samba Be a Backup Domain Controller to an NT4 PDC?
No. The native NT4 SAM replication protocols have not yet been fully implemented.
Q: – Explain "smbstatus" command?
The smbstatus utility displays information about connected users and currently locked files.
Q: – Is it possible for Samba to share file systems that have been mounted using NFS?
Yes. However, this can be problematic if the NFS server that provides the file system fails, causing the
Samba server to hang. It is always safer to use Samba to share a local file system.
Q: – How Do I Replicate the smbpasswd File?
Replication of the smbpasswd file is sensitive. It has to be done whenever changes to the SAM are made. Every user's
password change is done in the smbpasswd file and has to be replicated to the BDC. So replicating the
smbpasswd file very often is necessary.As the smbpasswd file contains plaintext password equivalents, it must not be sent
unencrypted over the wire. The best way to set up smbpasswd replication from the PDC to the BDC is to use the utility
rsync. rsync can use ssh as a transport. ssh itself can be set up to accept only rsync transfer without requiring the user to
type a password.As said a few times before, use of this method is broken and awed. Machine trust accounts will go out of
sync, resulting in a broken domain. This method is not recommended. Try using LDAP instead.

Samba Interview Questions & Answers part 4


Q: – Can Samba fully replace my Windows NT server that is not a Primary Domain Controller
(PDC)?
Samba can completely serve files and printers to Windows, just as a Windows NT server would.
Q: – How many simultaneous connections can a Samba server support?
In theory, there is no limit. In practice, the limit is determined by the server’s hardware, specifically the
total amount of available RAM and the CPU power. It might also depend on the amount of activity from
the smbd processes.
Q: – I want to use User level security for my samba server than what i have to add in smb.conf file?
security = user
Q: – How you will verify that your smb.conf file doesn’t have any mistakes and misspellings?
"testparm " tool that verifies the syntax of a configuration file(smb.conf).
testparm -s smb.conf
Q: – Can Samba replaces my Windows NT PDC?
Not completely. Samba domain control capabilities for a Windows 9x client are solid and complete, and
so these clients would probably never know the difference. The domain control support for Windows
NT/2000 clients is still being developed. Currently, enough has been implemented to allow a Windows NT
client to join a Samba-controlled domain, but there is more to domain control than that. The most
conspicuous absence is the lack of support for Windows NT trust relationships and the SAM replication
protocol used between NT PDCs and Backup Domain Controllers (BDCs).
Q: – What is the use of "smbclient" command?
"smbclient" is used to display the list of shares on your server. This verifies that smbd is running and
functioning correctly. The -L option instructs smbclient to enumerate the shares on the server rather than
actually connecting to one. The -N switch instructs smbclient to use an anonymous login rather than the
login name of the current user.
smbclient -L localhost -N
Antother use of "smbclient" command to connect the samba share.
smbclient //<server>/<share> -U <username>
Q: – What TCP and UDP ports required for NetBIOS over TCP/IP use?
The NBT name service uses port 137/udp, the NBT session service uses port 139/tcp, and the NBT
datagram service uses port 138/udp.
Samba Interview Questions & Answers part 5
Q: – How SMB protocol works?
There will be three stages in creating an SMB connection between a client and a specific share on a server.
The first stage in connecting to an SMB share is to negotiate the SMB protocol dialect to use. In the request
packet, the client sends a text listing of all the SMB dialects that it understands. The server selects the most
advanced protocol that it knows and responds to the client, specifying the protocol number from the list. At
this point, the client and server have agreed that SMB commands can be used for the remainder of the
conversation.
The second stage is to create a session connection between the client and server. To do this, the client
issues a session setup request, which includes a sername and some proof of validity, such as a password.
The server attempts to validate requesting user. If successful, the server then returns a session UID to
client. This UID is unique for each session and has no relation to the server internal representation of users.
The third stage before access to files on a remote share is allowed is for the client to make a successful tree
connection to the shared resource. The client sends to the server a tree connect request, which includes the
UID previously issued by the server. At this stage the server verifies that the authenticated user is
authorized to access the requested resource. If the user has sufficient privileges to access the share, the
client is issued a tree connection ID (TID). The TID is used in all requests to access files contained in the
resource to which the TID refers.
In this way SMB protocol works.
Q: – If a netbios name is not defined in smb.conf, than what will be netbios name?
If a netbios name is not defined, Samba will use the IP hostname of the server by default.
Q: – How many sections samba configuration file (smb.conf) contains?
smb.conf file contains three sections.
1. [global] Contains settings that determine Samba overall behavior.
2. [homes] A default share for providing a home directory for all users.
3. [printers] A default share for exporting all printers on the host via CIFS.

NFS Interview Questions & Answers part 1


Q: – Explain this entry /shared 192.168.1.0/255.255.255.0(sync,rw)
allows all systems with 192.168.1.* IP addresses read-write access to the /shared/ directory:

Q: – 192.168.1.51:/data is exported by NFS Server and i want to add this NFS share to client /etc/fstab file.
How you will add this entry in /etc/fstab file?
# device mount-point fs-type options dump fsckorder
192.168.1.51:/data /mnt nfs rw 0 0

Q: – What will happened if a space is given in between allowed_hosts and (options)


If a space is included, the options are applied to any and all IP addresses, which can be quite dangerous if
write permission is granted.

Q: – What is "portmap"?
The portmapper keeps a list of what services are running on what ports. This list is used by a connecting
machine to see what ports it wants to talk to access certain services.
Q: – 192.168.1.51:/data is exported by NFS Server and i want to add this NFS share to client /etc/fstab file.
How you will add this entry in /etc/fstab file?
# device &nbsp; mount-point fs-type options dump fsckorder
192.168.1.51:/data /mnt nfs rw 0 0
Q: – What is the role of "sync" option for NFS server
If sync is specified, the server waits until the request is written to disk before responding to the client. The
sync option is recommended because it follows the NFS protocol.
Q: – What do you understand by "nfsstat –nfs –server -3" command?
It will show statistics for NFS version 3 server.
Q: – Can NFS share mounted on Window XP and Justify your answer?
No, Window XP operating system doesn’t support nfs protocol.

NFS Interview Questions & Answers part 2


Q: – How to retrieve a list of clients connected to the NFS server ?
To retrieve a list of clients connected to the NFS server, use the showmount command from a shell prompt.
To also show the directories the clients are connected to, use the showmount -a command.
Q: – Which kernel module is used by "rpc.nfsd"?
nfsd.o kernel module
Q: – Explain the working of NFS mount daemon "rpc.mountd"?
The rpc.mountd program implements the NFS mount protocol. When receiving a MOUNT request from an
NFS client, it checks the request against the list of currently exported file systems. If the client is permitted
to mount the file system, rpc.mountd obtains a file handle for requested directory and returns it to the client.
Q: –Name of Configuration file for NFS Server ?
/etc/exports
Q: – Explain option "all_squash"?
The UID and GID of exported files are mapped to the user anonymous. It is good for public directories.
Q: – Explain "exportfs" command?
The exportfs command is used to maintain the current table of exported file systems for NFS.
Q: – What is meaning of "no_root_squash" option ?
Treat remote root user as local root. Do not map requests from root to the anony-
mous user and group ID.
Q: – Explain "Soft Mounting" option at NFS Client?

if a file request fails, the NFS client will report an error to the process on the client machine requesting the
file access. if it cannot be satisfied (for example, the server is down), then it quits. This is called soft
mounting.
Q: – Explain "Hard Mounting" option at NFS Client?

If a file request fails, the NFS client will report an error to the process on the client machine requesting the
file access. if it cannot be satisfied, then it will not quit until the request is satisfied. This is called Hard
mounting.
NFS Interview Questions & Answers part 3
Q: – What is NFS ?
NFS stands for Network File System. NFS was originally developed by Sun Microsystems in the 1980's.
NFS allows remote hosts to mount file systems over a network and interact with those file systems as
though they are mounted locally. This enables system administrators to consolidate resources onto
centralized servers on the network.
Q: – Which NFS versions are available ?
NFS Version 2
NFS Version 3
NFS Version 4
Q: – What is the role of "rmtab" File for NFS Server?
For every mount request received from an NFS client, rpc.mountd adds an entry to the /var/lib/nfs/rmtab
file. When receiving an unmount request, that entry is removed.
Q: – What is "portmap"?
The portmapper keeps a list of what services are running on what ports. This list is used by a connecting
machine to see what ports it wants to talk to access certain services.
Q: – What is different between NFS Version 2 & 3 ?
nfs 2 default 8kb transfer rate,it did not check the authentication at the time connection.client wants to
access unauthorized file it shows error messages like "write error","read error" nfs 3 32kb transfer rate. It
check at the time connection- ACL Support
Q: – What do you understand by "nfsstat –nfs –server -3" command?

It will show statistics for NFS version 3 server.


Q: – Can NFS share mounted on Window XP and Justify your answer?

No, Window XP operating system doesn’t support nfs protocol.


NFS Interview Questions & Answers part 4
Q: – Can we grant access by Username and password for nfs share?
No, access is granted only for IP address.
Q: – Which option is used with exportfs command to display the current export list, also displays the list of
export options?
exportfs -v
Q: – Which option is used with exportfs command to re-export all directories?
exportfs -r
Q: – What is the role of "all_squash" option?
Treat all client users as anonymous users. Map all user and group IDs to the anonymous user and group ID.
Q: – Explain command "/usr/sbin/exportfs -f"?

It will flush everything out of the kernels export table. Any clients that are active will get new entries added
by mountd when they make their next request.
Q: – How you will export directory (/data) to host 192.168.1.51, allowing asynchronous writes without
adding the entry in /etc/exports file?

# exportfs -o async 192.168.1.51:/data


Q: – What is the role of "root_squash" option?
All requests from the user root are translated or mapped as if they came from the user anonymous (default).

Active Directory Interview Questions & Answers


Q: – What Is Active Directory?
Active Directory consists of a series of components that constitute both its logical structure and its physical
structure. It provides a way for organizations to centrally manage and store their user objects, computer
objects, group membership, and define security boundaries in a logical database structure.
Q: – What is the Purpose of Active Directory?
Active Directory stores information about users, computers, and network resources and makes the
resources accessible to users and applications. It provides a consistent way to name, describe, locate,
access, manage, and secure information about these resources.
Q: – What are the Functions of Active Directory?
Active Directory provides the following functions:
Centralizes control of network resources By centralizing control of resources such as servers, shared files,
and printers, only authorized users can access resources in Active Directory.
Centralizes and decentralizes resource management Administrators have Centralized Administration with
the ability to delegate administration of subsets of the network to a limited number of individuals giving
them greater
granularity in resource management.
Store objects securely in a logical structure Active Directory stores all of the resources as objects in a
secure, hierarchical logical Structure.
Optimizes network traffic The physical structure of Active Directory enables you to use network bandwidth
more
efficiently. For example, it ensures that, when users log on to the network, the authentication authority that
is nearest to the user, authenticates them reducing the amount of network traffic.
Q: – What Are Objects?
An object is a distinct set of attributes that represents a network resource (a user, a computer, a group
policy, etc), and object attributes are characteristics of that object stored in the directory. For example,
some of the attributes of a user object might include the user’s first name, last name, department, and e-
mail address in addition to others.
Q: –What Are Organizational Units?
An organizational unit (OU) is a versatile container object used to organize objects within a domain into
logical administrative groups. These logical administrative groups can include just one type of object or
multiple types depending on how an administrator wants to structure it. Think of an OU like a large box
that can contain many things, including other boxes (other OUs called sub-OUs), and those boxes can then
contain additional boxes (additional sub-OUs) as well.
Q: – What Are Domains?
The Domain is the core unit of logical structure in Active Directory. Grouping objects into one Or more
domains allow a company’s organization to be reflected in its network. All network objects exist within a
domain, and each domain stores information only about the Objects it contains (objects that belong to that
domain).
Q: – What Are Trees?
A tree is a grouping or hierarchical arrangement of one or more Windows 2000 / 2003 domains that allows
global resource sharing. A tree may consist of a single Windows 2000 domain or multiple domains in a
contiguous namespace. You can create a larger tree (contiguous namespace) by joining multiple domains in
a hierarchical structure, since all domains within a single tree share a common namespace and a
hierarchical naming structure. Following naming conventions, the domain name of a child domain is the
name of that child domain appended with the name of the parent domain.
Q: – What Are Forests?
A forest is a grouping of one or more trees. As noted above with our example of tailspintoys.com and
nwtraders.com, each of those is a tree within our forest even though their naming conventions are not
related. It does not matter if each Tree is made up with a single, or multiple domains. Forests allow
organizations to group together divisions that do not use the same naming scheme, and may need to operate
independently, but still need to communicate with the entire organization via transitive trusts, and share the
same schema and configuration container.
The first domain in the forest is called the forest root domain. The name of that domain refers to the forest,
such as nwtraders.msft. By default, the information in Active Directory is shared only within the forest.
This way, the forest is a security boundary for the information that is contained in the instance of Active
Directory.
Q: – How many types of replication in Active Directory?
Active Directory Intrasite Replication
Intrasite replication in Active Directory takes place between domain controllers within the same site. This
makes intrasite replication an uncomplicated process. When changes are made to the replica of Active
Directory on one particular domain controller, the domain controller contacts the remainder of the domain
controllers within the site. The domain controller checks the information it contains against information
hosted by the other domain controllers. To perform this analysis, the domain controller utilizes logical
sequence numbers. Intrasite replication utilizes the Remote Procedure Call (RPC) protocol to convey
replication data over fast, reliable network connections. With intrasite replication, replication data is not
compressed.
Active Directory Intersite Replication
Intersite replication takes place between sites. Intersite replication can utilize either RPC over IP or SMTP
to convey replication data. This type of replication has to be manually configured. Intersite replication
occurs between two domain controllers that are called bridgeheads or bridgehead servers. The role of
a bridgehead server (BS) is assigned to at least one domain controller in a site. A BS in one site deals with
replicating changes with other BSs in different sites. You can configure multiple bridgehead servers in a
site. It is only these BSs that replicate data with domain controllers in different domains by performing
intersite replication with its BS partners. With intersite replication, packets are compressed to save
bandwidth. This places additional CPU load on domain controllers assigned the BS role. BSs should
therefore be machines that have enough speed and processors to perform replication. Intersite replication
takes place over site links by a polling method which is every 180 minutes by default.

LDAP Interview Questions & Answers


Q: – Is there Graphical editors for LDAP ?
Yes, Following are some GUI based tools for LDAP
– GQ
– Java LDAP Browser/Editor
– Softerra LDAP Browser
Q: – What can i do if my application doesn’t speak to LDAP ?
Gateway that translate one directory access protocol into another.
Q: – How can i join information contained in different directories ?
Distributed, Multivendor directories glued together by referrals and references.
Q: – What is “LDIF” ?
The LDAP Interchange Format (LDIF) is a standard text file format for storing LDAP configuration
information and directory contents. LDIF files are often used to import new data into your directory or
make changes to existing data.
Q: – Name the object class types ?
– Structural Object class
– Auxiliary Object class
– Abstract object classes
Q: – What is the name of main configuration file name for LDAP server ?
slapd.conf
Q: – What is LDAP ?
LDAP stands for Lightweight Directory Access Protocol. In plain and simple terms, its a database whereby
it has all the details of all of organizations, individuals, and other resources such as files and devices in a
network, whether on the Internet or on corporate intranetand whether or not you know the domain name, IP
address, or geographic whereabouts. An LDAP directory can be distributed among many servers on a
network, then replicated and synchronized regularly. An LDAP server is also known as a Directory System
Agent (DSA). Its a not a relational database. Outlook and other email programs uses LDAP to search for a
recipient in an organization.
Q: – What is the relationship between LDAP and JNDI?
JNDI has classes provided by SUN that will help ur appln interact with and LDAP server. JNDI appln work
similarly to JDBC applns once and be free to use ‘drivers’ from different vendors. SUN provides the
“driver” that will help interact with the LDAP server. Sun also provides “drivers” for other naming services
(like CORBA).
Q: – Why LDAP is called light weight?
LDAP (Lightweight Directory Access Protocol) is a protocol for communications between LDAP servers
and LDAP clients.
LDAP servers store “directories” which are access by LDAP clients.
LDAP is called lightweight because it is a smaller and easier protocol which was derived from the X.500
DAP
(Directory Access Protocol) defined in the OSI network protocol stack.
Q: – what is SLAPD?
SLAPD stands for Stand-Alone LDAP.Clients connect to the server over the LDAP protocol, usually using
a network-based connection (though SLAPD provides a UNIX socket listener).
Q: – Which daemons are required for LDAP server?
slapd and slurpd
Q: – Tell me the name of three LDAP Client utilities or Applications
ldapsearch
ldapadd
ldapmodify
Q: – Define Schemas?
Schemas provide definitions of the different object classes and attribute types that OpenLDAP should
support. Using these, OpenLDAP can determine what entries it is allowed to store, whether any given entry
is valid, and how entries should optimally be stored.
Q: – Explain modulepath directive?
The modulepath directive provides the full path to the directory where the modules (the compiled libraries)
are stored
Q: – Explain moduleload directive?
The moduleload directive instructs OpenLDAP to load a particular module.
Q: – What is HDB?
HDB is the new generation storage mechanism for OpenLDAP. Like its predecessor, the BDB backend,
HDB uses the Oracle BerkeleyDB database for storage, but HDB stores entries hierarchically, a perfect fit
for LDAP’s tree structure. The old BDB backend is still supported, and you can use it by specifying bdb
instead of hdb in the database directive.
Q: – Which utility is used to Encrypt the password?
ldappasswd
Q: – How you will verify LDAP configuration file?
Use “slaptest” utility.
slaptest -v -f /etc/ldap/slapd.conf
Q: – Which web based tool you have used for LDAP?
phpLDAPadmin

Linux Boot Process


In this article we are going to study “Linux Boot Process”. During booting time of Linux operating system,
boot process have to go through six basic stages.
Boot Stage 1:
BIOS Checks: When a Linux server or desktop or laptop booted, The processor goes for Basic
Input/Output System or BIOS program and runs it.The BIOS controls does not controll only the first step of
the boot process, but BIOS also provides the lowest level interface to peripheral devices. It means during
the BIOS initialization, all hardware peripheral devices checked out by BIOS. If BIOS found any hardware
is faulty, you will get message on your screen.For this reason BIOS Process is written into read-only
mode.The BIOS then loads into memory whatever program is residing in the first sector of this device,
called the Master Boot Record or MBR. The MBR is only 512 bytes in size and contains machine code
instructions for booting the machine, called a boot loader, along with the partition table. Once the BIOS
finds and loads the boot loader program into memory,it yields control of the boot process to it.
Note: The default boot loader for Linux platform is GRUB.
Boot Stage 2:
First stage boot loader: The first stage of Boot Loader is a small machine code binary on MBR. The first
stage boot loader loads itself into memory.first stage boot loader job is to find out the second stage boot
loader and load the first part of it into memory.
Boot Stage 3:
Second stage boot loader: The second stage boot loader loads the kernel into memory, which in turn loads
any necessary modules and mounts the root partition read-only. Once the second stage boot loader is in
memory, it presents the user with a graphical screen showing the different operating systems or kernels that
has been configured to boot. You can use Arrow keys to select your operating system for boot.
Boot Stage 4:
INIT Program: The Linux operating system kernel transfers the control of the boot process to the
/sbin/init program.The /sbin/init program coordinates the rest of the boot process and configures the
environment for the user.
Boot Stage 5:
User Environment Setup: The init program loads all services and user-space tools, and mounts all
partitions listed in /etc/fstab. When the init command starts, it becomes the parent or grandparent of all of
the processes that start up automatically on the system. First, it runs the /etc/rc.d/rc.sysinit script, which sets
the environment path, starts swap, checks the file systems, and executes all other steps required for system
initialization.The init command then runs the /etc/inittab script, which describes how the system should be
set up in each SysV init runlevel.The init program starts all of the background processes by looking in the
appropriate rc directory for the runlevel specified as the default in /etc/inittab. The rc directories are
numbered to correspond to the runlevel they represent.
Note: By Default, run level 5 is defined in /ete/inittab file.
Boot Stage 6:
Login Screen: The user will get a login screen for the freshly booted Linux system.

Basic Linux File system tutorial – ext2,ext3,ext4,JFS & XFS


The original Linux system used a simple file system that mimicked the functionality of the Unix file
system. In this tutorial we will discuss basic file system used in Linux.
THE EXT FILE SYSTEM
The original file system introduced with the Linux operating system is called the extended file system (or
just ext for short). It provides a basic Unix- like file system for Linux, using virtual directories to handle
physical devices, and storing data in fixed-length blocks on the physical devices.
The ext file-system uses a system called inodes to track information about the files stored in the virtual
directory. The inode system creates a separate table on each physical device, called the inode table , to store
the file information. Each stored file in the virtual directory has an entry in the inode table. The extended
part of the name comes from the additional data that it tracks on each file, which consists of:
The file name
The file size
The owner of the file
The group the file belongs to
Access permissions for the file
Pointers to each disk block that contains data from the file
Linux references each inode in the inode table using a unique number (called the inode number ), assigned
by the file system as data files are created. The file system uses the inode number to identify the file rather
than having to use the full file name and path.
THE EXT2 FILE SYSTEM
The original ext file system had quite a few limitations, such as limiting files to only 2GB in size. Not too
long after Linux was first introduced, the ext file system was upgraded to create the second extended file
system, called ext2 .
As you can guess, the ext2 file system is an expansion of the basic abilities of the ext file system, but
maintains the same structure. The ext2 file system expands the inode table format to track additional
information about each file on the system.
The ext2 inode table adds the created, modified, and last accessed time values for files to help system
administrators track file access on the system. The ext2 file system also increases the maximum file size
allowed to 2TB (then in later versions of ext2, that was increased to 32TB) to help accommodate large
files commonly found in database servers.
In addition to expanding the inode table, the ext2 file system also changed the way in which files are stored
in the data blocks. A common problem with the ext file system was that as a file is written to the physical
device, the blocks used to store the data tend to be scattered throughout the device (called fragmentation ).
Fragmentation of data blocks can reduce the performance of the file system, as it takes longer to search the
storage device to access all of the blocks for a specific file.
The ext2 file system helps reduce fragmentation by allocating disk blocks in groups when you save a file.
By grouping the data blocks for a file, the file system doesn’t have to search all over the physical device for
the data blocks to read the file. The ext2 file system was the default file system used in Linux distributions
for many years, but it, too, had its limitations. The inode table, while a nice feature that allows the file
system to track additional information about files, can cause problems that can be fatal to the system. Each
time the file system stores or updates a file, it has to modify the inode table with the new information. The
problem is that this isn’t always a fluid action.
If something should happen to the computer system between the file being stored and the inode table being
updated, the two would become out of sync. The ext2 file system is notorious for easily becoming
corrupted due to system crashes and power outages. Even if the file data is stored just fine on the physical
device, if the inode table entry wasn’t completed, the ext2 file system wouldn’t even know that the file
existed! It wasn’t long before developers were exploring a different avenue of Linux file systems.
JOURNALING FILE SYSTEMS
Journaling file systems provide a new level of safety to the Linux system. Instead of writing data directly to
the storage device and then updating the inode table, journaling file systems write file changes into a
temporary file (called the journal) first. After data is successfully written to the storage device and the
inode table, the journal entry is deleted.
If the system should crash or suffer a power outage before the data can be written to the storage device, the
journaling file system just reads through the journal file and processes any uncommitted data left over.
There are three different methods of journaling commonly used in Linux, each with different levels of
protection. These are shown in below Table.
Journaling File system Methods
Method Description
Both inode and file data are journaled. Low risk of losing data, but poor
Data mode
performance.
Only inode data written to the journal, but not removed until file data is
Ordered mode
successfully written. Good compromise between performance and safety.
Writeback Only inode data written to the journal, no control over when the file data is
mode written. Higher risk of losing data, but still better than not using journaling.
Limitation:
The data mode journaling method is by far the safest for protecting data, but it is also the slowest. All of the
data written to a storage device must be written twice, once to the journal, then again to the actual storage
device. This can cause poor performance, especially for systems that do a lot of data writing. Over the
years, a few different journaling file systems have appeared in Linux. The following sections describe the
popular Linux journaling file systems available.
THE EXTENDED LINUX JOURNALING FILESYSTEMS
The same group that developed the ext and ext2 file systems as part of the Linux project also created
journaling versions of the file systems. These journaling file systems are compatible with the ext2 file
system, and it’s easy to convert back and forth between them. There are currently two separate journaling
file systems based on the ext2 file system.
THE EXT3 FILE SYSTEM
The ext3 file system was added to the Linux kernel in 2001, and up until recently was the default file
system used by just about all Linux distributions. It uses the same inode table structure as the ext2
filesystem, but adds a journal file to each storage device to journal the data written to the storage device.
By default, the ext3 file system uses the ordered mode method of journaling, only writing the inode
information to the journal file, but not removing it until the data blocks have been successfully written to
the storage device. You can change the journaling method used in the ext3 filesystem to either data or
writeback modes with a simple command line option when creating the file system.
While the ext3 file system added basic journaling to the Linux file system, there were still a few things it
lacked. For example, the ext3 file system doesn’t provide any recovery from accidental deletion of files,
there’s no built-in data compression available (although there is a patch that can be installed separately that
provides this feature), and the ext3 file system doesn’t support encrypting files. For those reasons
developers in the Linux project choose to continue work on improving the ext3 file system.
THE EXT4 FILE SYSTEM
The result of expanding the ext3 file system was (as you probably guessed) the ext4 file system. The ext4
file system was officially supported in the Linux kernel in 2008, and is now the default file system used in
most popular Linux distributions, such as Fedora and Ubuntu.
In addition to support compression and encryption, the ext4 file system also supports a feature called
extents .Extents allocate space on a storage device in blocks, and only store the starting block location in
the inode table. This helps save space in the inode table by not having to list all of the data blocks used to
store data from the file.
The ext4 file system also incorporates block pre-allocation . If you want to reserve space on a storage
device for a file that you know will grow in size, with the ext4 file system it’s possible to allocate all of the
expected blocks for the file, not just the blocks that physically exist. The ext4 file system fills in the
reserved data blocks with zeroes, and knows not to allocate them for any other file.
THE REISER FILE SYSTEM
In 2001, Hans Reiser created the first journaling file system for Linux, called ReiserFS . The ReiserFS file
system only supports writeback journaling mode, writing only the inode table data to the journal file.
Because it writes only the inode table data to the journal, the ReiserFS file system is one of the fastest
journaling file systems in Linux.
Two interesting features incorporated into the ReiserFS file system are that you can resize an existing file
system while it’s still active, and that it uses a technique called tailpacking, which stuffs data from one file
into empty space in a data block from another file. The active file system resizing feature is great if you
have to expand an already created file system to accommodate more data.
THE JOURNALED FILE SYSTEM(JFS)
Possibly one of the oldest journaling file systems around, the Journaled File System (JFS) was developed
by IBM in 1990 for its AIX flavor of Unix. However, it wasn’t until its second version that it was ported to
the Linux environment.
Note -The official IBM name of the second version of the JFS file system is JFS2, but most Linux systems
refer to it as just JFS.
The JFS file system uses the ordered journaling method, storing only the inode table data in the journal, but
not removing it until the actual file data is written to the storage device. This method is a compromise
between the speed of the ReiserFS and the integrity of the data mode journaling method.
The JFS file system uses extent-based file allocation, allocating a group of blocks for each file written to
the storage device. This method provides for less fragmentation on the storage device. Outside of the IBM
Linux offerings, the JFS file system isn’t popularly used, but you may run into it in your Linux journey.
THE XFS FILE SYSTEM
The XFS journaling file system is yet another file system originally created for a commercial Unix system
that made its way into the Linux world. Silicon Graphics Incorporated (SGI) originally created XFS in
1994 for its commercial IRIX Unix system. It was released to the Linux environment for common use in
2002.
The XFS file system uses the writeback mode of journaling, which provides high performance but does
introduce an amount of risk because the actual data isn’t stored in the journal file. The XFS file system also
allows online resizing of the file system, similar to the ReiserFS file system, except XFS file systems can
only be expanded and not shrunk.
Recover deleted LVM partitions in CentOS/RHEL/Fedora
While working on linux production boxes,some times system admin mistakenly delete LVM partitions.
Using the command 'vgcfgrestore' we can recover deleted LVM partitions. Linux keeps the backup copies
of lvm configuration in the/etc/lvm/archive directory. In my scenario I have deleted 10GB lvm partition,
follow the below steps to recover the LVM partition :
STEP:1 FIRST FIND THE BACKED UP CONFIGURATIONS OF VOLUME GROUP
(MY-VG)
Synatx :
# vgcfgrestore --list < Volume-Group-Name >

# vgcfgrestore --list my-vg

As you can see in the above example correct configuration are backed up , in my case “my-vg_00002-
692643462.vg” is correct file through which I will recover my lvm partitions.
STEP:2 NOW RECOVER THE LVM PARTITION USING VGCFGRESTORE AND ARCHIVE FILE
Syntax
# vgcfgrestore -f /etc/lvm/archive/<file-name> <Voulme-Group-Name>
# vgcfgrestore -f /etc/lvm/archive/my-vg_00002-692643462.vg my-vg
Output would be : 'Restored volume group my-vg'

Redhat Linux Interview Questions and Answers part1


Q: – How are devices represented in UNIX?
All devices are represented by files called special files that are located in /dev directory.
Q: – Tell me the steps to remove the swap file?
Firstly disable the swap file by “swapoff” command.
Remove Swap file entry from /etc/fstab file.
Now remove the swap file by “rm” command.
Q: – What can we do with “parted” command or utility?
– View the existing partition table
– Add partitions from free space or additional hard drives
– Change the size of existing partitions
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: – Can we resize the size of a partition?
Yes, we can resize the size of partition by “parted” command.
#parted /dev/sda
print
To resize the partition, use the resize command followed by the minor number for the partition, the starting
place in megabytes, and the end place in megabytes. For example:
resize 3 1024 2048
After resizing the partition, use the print command to confirm that the partition has been resized correctly,
is the correct partition type, and is the correct file system type.
Q: – What is LVM?
LVM stands for Logical Volume Manager. LVM, is a storage management solution that allows
administrators to divide hard drive space into physical volumes (PV), which can then be combined into
logical volume groups (VG), which are then divided into logical volumes (LV) on which the filesystem and
mount point are created.
Q: – What are the steps to create LVM?
– Create physical volumes by “pvcreate” command
#pvcreate /dev/sda2
– Add physical volume to volume group by “vgcreate” command
#vgcreate VLG0 /dev/sda2
– Create logical volume from volume group by “lvcreate” command.
#lvcreate -L 1G -n LVM1 VLG0
Now create file system on /dev/sda2 partition by “mke2fs” command.
#mke2fs -j /dev/VLG0/LVM1
Q: – How we will check free space on drive /dev/sda with parted command?
#parted /dev/sda
print
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.
Redhat Linux Interview Questions and Answers part2
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 is the difference between LVM and RAID?
RAID provides redundancy but LVM doesn’t provide Redundancy.
Q: – What are LVM1 and LVM2?
LVM1 and LVM2 are the versions of LVM.
LVM2 uses device mapper driver contained in 2.6 kernel version.
LVM 1 was included in the 2.4 series kernels.
Q: – What is physical extent (PE)?
Each physical volume is divided chunks of data, known as physical extents; these extents have the same
size as the logical extents for the volume group.
Q: – What is logical extent (LE)?
Each logical volume is split into chunks of data, known as logical extents. The extent size is the same for
all logical volumes in the volume group.
Q: – What command is used to remove the password assigned to a group?
gpasswd -r
Q: – What is Volume group (VG)?
The Volume Group is the highest level abstraction used within the LVM. It gathers together a collection of
Logical Volumes and Physical Volumes into one administrative unit.
Q: – Explain LVM snapshot?
LVM snapshots allow the administrator to create a new block device which presents an exact copy of a
logical volume, frozen at some point in time.
Q: – What can you type at a command line to determine which shell you are using?
echo $SHELL

Redhat Linux Interview Questions and Answers part3


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: – How you will check on Your server or system device-mapper is installed or not?
Check the following file.
#cat /proc/misc
if this file contains "device-mapper" term it means device mapper is installed on your system.
Q: – How are snapshots in LVM2 different from LVM1?
In LVM2 snapshots are read/write by default, whereas in LVM1, snapshots were read only.
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: – If a volume group named as VG0 already exists but i need to extend this volume group up to
4GB.Explain all steps?
Firstly create Physical volume (/dev/sda7) of size 4GB.
Now run following command.
vgextend VG0 /dev/sda7
Q: – If a volume group VG0 have 3 PV's (/dev/sda6, /dev/sda7, /dev/sda8) but i want to remove
/dev/sda7 pv from this VG0?
vgreduce VG0 /dev/sda7
Q: – What is the maximum size of a single LV?
For 2.4 based kernels, the maximum LV size is 2TB.
For 32-bit CPUs on 2.6 kernels, the maximum LV size is 16TB.
For 64-bit CPUs on 2.6 kernels, the maximum LV size is 8EB.
Q: – Which command is used to extend a logical volume?
lvextend –size +<addsize> /dev/<vgname>/<lvname>
resize2fs /dev/<vgname>/<lvname>
Q: – What daemon is responsible for tracking events on your system?
syslogd
Redhat Linux Interview Questions and Answers part4
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 all steps to remove a LVM?
To remove a logical volume from a volume group, first unmount it with the umount command:
umount /dev/<vgname>/<lvname>
and then use the lvremove command:
lvremove /dev/<vgname>/<lvname>
Q: – Which command is used to create LVM Snapshot?
vcreate –size <size> -s -n <snapshotname> <lvname>
The lvcreate command is used to create a new logical volume, meaning there must be free physical extents
in the logical volume group to create a snapshot. The -s option means that the LV is a snapshot,
<snapshotname> is the name of the new LV created, and <lvname> is the name of the LV from which to
create the snapshot.
Q: – What is the location of "network" file and what does this contains?
location :- /etc/sysconfig/network
This file contains following fields
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=localhost.localdomain
Q: – Which deamon is required to start Network services?
network
/etc/init.d/network start
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 is the role of /etc/resolv.conf file?
In this file we sets the DNS servers (using their IP addresses) and the search domain. The values of the
DNS servers are often added when the network is activated because the data can be provided by DHCP or a
similar service.
Q: – Is there any relation between modprobe.conf file and network devices?
Yes, This file assigns a kernel module to each network device.
For Example :-
[root@localhost ~]# cat /etc/modprobe.conf
alias eth0 b44
Here b44 is the kernel module for network device eth0.
We can Confirm by following command (This module “b44” is present or not).
[root@localhost ~]# lsmod |grep b44
b44 29005 0
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.
Redhat Linux Interview Questions and Answers part 5
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 is the location of log files for CUPS?
The log files for the CUPS printing system are located in the /var/log/cups/ directory.
Q: – What is YUM?
YUM stands for Yellow dog Updater, Modified because it is based on YUP, the Yellow dog Updater.
Where does the name Yellow dog come from? Yellow Dog is a version of Linux for the Power
Architecture hardware and is RPM-based, just like Red Hat Enterprise Linux and Fedora. YUP, and later
YUM, were written by the Linux community as a way to maintain an RPM-based system.
Q: – How you will install software by YUM?
yum install <pkgname>
Q: – Which option is required to assume the answer "yes" to any questions asked during installation
of package dependencies for YUM?
The "-y" option is used to assume the answer "yes".
For Example
yum -y install squid
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 are the advantages of YUM?
– Automatic resolution of software dependencies.
– Multiple software locations at one time.
– Ability to specify particular software versions or architectures.
Q: – How to remove a software by YUM?
yum remove <pkgname>
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.
Redhat Linux Interview Questions and Answers part 6
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
Character Device Files:-
Character device files talk to devices character by character.
Examples: – Virtual terminals, terminals, serial modems, random numbers
#ls /dev/tty*
crw-rw—- 1 root root 4, 64 Mar 15 2009 ttyS0
crw-rw—- 1 root root 4, 65 Mar 15 2009 ttyS1
crw-rw—- 1 root root 4, 66 Mar 15 2009 ttyS2
crw-rw—- 1 root root 4, 67 Mar 15 2009 ttyS3

Q: – How to install Linux software’s by RPM?


rpm -ivh test-1.0-1.i386.rpm
Q: – If a file associated with test-1.0-1.i386.rpm deleted, than How we will recover that file?
We can reinstall this rpm again.
Q: – Which options are required to upgrade a RPM?
Upgrading a package is similar to installing one. Type the following command at a shell prompt:
rpm -Uvh test-2.0-1.i386.rpm
Q: – In which directory RPM database stored?
/var/lib/rpm
Q: – Tell me the name of device file for PS/2 mouse connection.

/dev/psaux
Q: – If you are getting error "package is already installed" but you have to install package any how. what
option you will use?
rpm -ivh test-1.0-1.i386.rpm
Preparing… ########################################### [100%] package test-1.0-1 is already
installed
In this case you can use "–replacepkgs" option.
rpm -ivh –replacepkgs test-1.0-1.i386.rpm
Q: – Explain the command "rpm -qa"?

It will queries all currently installed packages.


Q: – Tell me the name of device file for parallel port (Printers).

/dev/lp0

Redhat Linux Interview Questions and Answers part 7


Q: – What does /etc/X11/ directory contains?
The /etc/X11/ directory is for X Window System configuration files, such as xorg.conf.
Q: – How to list PCI Devices on your server or System?
use "lspci" command.
Q: – What is the role of "Kudzu"?
Kudzu is used to Detect new Hardware.
Q: – How to Enable ACLs for /home partition?
Add following entry in /etc/fstab
LABEL=/home /home ext3 acl 1 2
Now remount /home partition with acl option.
mount -t ext3 -o acl /dev/sda3 /home
Q: – How to View ACLs for a file(test_file)?
getfacl test_file
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: – What does /etc/X11/ directory contains?
The /etc/X11/ directory is for X Window System configuration files, such as xorg.conf.
Q: – How to list PCI Devices on your server or System?
use "lspci" command.
Q: – What is the role of "Kudzu"?
Kudzu is used to Detect new Hardware
Q: – How to Enable ACLs for /home partition?
Add following entry in /etc/fstab
LABEL=/home /home ext3 acl 1 2
Now remount /home partition with acl option.
mount -t ext3 -o acl /dev/sda3 /home
Q: – How to View ACLs for a file(test_file)?
getfacl test_file
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: – What happens when you add a new device after installation?
The Kudzu program runs each time the system boots and performs a hardware probe. If new hardware is
found, Kudzu attempts to map it to a kernel module. If successful, the information is saved, and the device
is configured.
Q: – How to remove an ACL?
setfacl –remove-all <file-name>
Q: – Tell me name of Linux File systems?
Ext2
Ext
Redhat Linux Interview Questions and Answers part 8
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: – Explain the command "rpm -qf "?
it queries the RPM database for which package owns <filename>. When specifying a file, specify the
absolute path of the file.
Q: – How to verify all installed packages?
rpm -Va
Q: – How Many Run Levels present in Linux?
There are 7 run levels, with each having its own properties.
– 0: Halt the system
– 1: Single-user mode
– 2: Not used
– 3: Multi-user mode with text login
– 4: Not used
– 5: Multi-user mode with graphical login
– 6: Reboot
Q: – Which configuration file is required to change the Run Level of Server or system?
/etc/inittab
To change the default run level, modify this line.
id:5:initdefault:
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 to verify the signature of an rpm?
rpm -K test-1.0-1.i386.rpm
Q: – Explain architectures required for RPMs?
noarch Architecture-independent, can run on any architecture
i386 Generic build for a 32-bit x86 system
i586 Sometimes used when building kernels for older x86 processors
Intel® Pentium ® II, Intel Pentium III, Intel Pentium 4, AMD Athlon, and
i686 AMD Duron systems (Most RPMs for these architectures are built using the i386 architecture, with
the kernel for these architectures being built with the
i686 for optimal performance.)
x86_64 64-bit processors such as AMD Athlon64, AMD Opteron, and Intel EM64T
ia64 Intel® Itanium
ppc 32-bit IBM® POWER, IBM eServer„ pSeries®, and IBM eServer iSeries
s390x 64-bit IBM eServer System z
Q: – How we create ext3 file system on /dev/sda7 disk?
# mkfs –j /dev/sda7
Redhat Linux Interview Questions and Answers part 9
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/<Block-Device-Name>
Q: – What "neat" command will do?
neat command provides Graphical interface to change network settings for network devices.
Q: – Which protocol is required to allow local printing and print sharing?
Internet Printing Protocol (IPP) is required to allow local printing and print sharing.
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
Q: – What is CUPS?
CUPS stands for "Common UNIX Printing System". CUPS is a open source printing system developed by
Apple Inc. CUPS uses the Internet Printing Protocol (IPP) to allow local printing and print sharing.
Q: – How we will create ext4 file system?
# mke2fs -t ext4 /dev/DEV
Redhat Linux Interview Questions and Answers part 10
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: – 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: – 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: – 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 the use of sysctl command?
The /sbin/sysctl command is used to view, set, and automate kernel settings in the /proc/sys/ directory.
Redhat Linux Interview Questions and Answers part 11
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 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: – 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

You might also like