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.

Wednesday, 20 September 2017

Basic Linux interview questions for Freshers


This article presents a basic Linux interview questions with answers for fresher.
What Squid service do?
Squid provides the Proxy service, which caches and filters web traffic.
Which popular office suite freely available for both Microsoft and Linux ?
Open office suite is freely available. You can install it on both OS Microsoft and Linux.
You company recently switched from Microsoft to Linux. All their documents are created on Microsoft office 2007. How will you manage documents created on Microsoft office 2007 ?
Install open office suite in Linux. It allows you work with Microsoft documents.
What is the SMTP ?
SMTP is the most common protocol for an e-mail server.
What is NNTP ?
NNTP is the common protocol which is used for news services. LeafNode and INN are examples of news servers.
What Samba service do ?
The Samba service provides Microsoft SMB support in Linux so that Linux machines can connect to Microsoft network resources.
Which service provides searching capabilities on an intranet or domain?
Dig is the common name of the service that provides searches on an intranet or domain.
Name any of three spreadsheet programs, those are equivalent to Microsoft Excel and available for Linux?
·      Openoffice calc [Free]
·      KOffice Kspread [Free]
·      StarOffice Base [commercial ]
·      Corel Quattro [commercial]
Which service can be used with NFS to provide remote file access for UNIX systems?
NIS is used with NFS to provide remote file access for UNIX systems.
What is MTA?
MTA is a service of Sendmail server, which transfer mail from one network or host to another network or host.
Name a connection-less protocol for file transfer.
TFTP is a connection-less protocol for file transfer.
You company wants to run Web Server on their intranet. Which Linux package should you use for this ?
To run a Web server, you should install the Apache Web server.
You company have slow internet connection. Which Linux service you can use to manage internet connection ?
You should use Squid proxy server, which allows to manage the web contents and also cache the web pages to decrease the amount of traffic going to Internet.
You have tasked with implementing new Linux systems in your lab, those will be used in training of Linux. What type of Linux distribution should you choose?
For LAB environment you can use free Linux version of Linux distribution. In test system at company or in a Lab environment where usually no real risk in making mistakes you should use free version of Linux. While distribution itself maybe free or nearly free, you will be required to pay for technical support. In Lab environment where time permits you, instead of seeking helping hands, try to solve the issue at your own, that could a great learning experience.
You have tasked with implementing a new Linux server in your network that will store confidential information of company. Your lab technician have fedora. Should you use it for your new server?
You could use it, but you should not use it for server. It is not recommended to use an obscure, unsupported distribution for critical server. A well-know, well-supported distribution like RHEL would be a better choice. If a technical problem occurs at some point after the server has been installed, you need to be able to call someone and get an answer immediately rather than searching on internet to find a solution. You should be able to solve the issue and get the server back into production as fast as possible.
You are installing a Linux system that will run a software that creates very large log files. Which directory should you create separate partition for ?
Create a separate partition at /var directory.
You are installing a Linux system that will provide file storage for a number of network users. Which directory should you create separate partition for?
Create a separate /home directory.
Which port should you open in your host firewall to run web server?
By default web server use port 80 and 443 which you need to open in firewall.
Which IP addressing should you use for Server?
For server you should always use static IP address.
Which IP address should you use for client desktop?
For client you can use both static and dynamic method. For easy management using DHCP to assign IP address would be the best option.
You are installing RHEL in new system that will be used by software developer to develop advance program. Which option should you choose during the installation, while installation program ask you to choose the set of software?
Choose Software Development Workstation and use customize now option to select additional packages.
You are installing RHEL in new system that will used by an administrative assistant to type documents, create presentations, and manage e-mail. Which option should you choose during the installation, while installation program ask you to choose the set of software?
Choose Desktop and use customize now option to select additional packages.
Which partition is used for virtual memory by a Linux system?
swap
Which ports should you open in host firewall for an email server?
·      Open port 110 which is used by the POP3 e-mail protocol.
·      Open port 25 which is used by the SMTP e-mail protocol.
·      Open port 143 which is used by the IMAP e-mail protocol.
Your Linux system have two SCSI hard disk drives. The first drive is assigned as SCSI ID 0, and the second drive is assigned SCSI ID 1. How these will be refers in system?
/dev/sda point to the first SCSI drive.
/dev/sdb points to the second SCSI drive
Your Linux system have a single IDE hard disk drive. How partitions will be refers on the IDE drive?
·      hd refers for IDE hard disk
·      a refers for first hard disk. If system have multiple hard disk use b for second, c for third and so on till last hard disk.
·      1 refers for first partition, 2 for second partition and so on till last partition.
For example
·      /dev/hda1 points to the first partition on the first IDE
·      /dev/hdd4 points to the fourth partition on the fourth IDE

·      /dev/hdc2 points to the second partition on the third IDE

Linux system admin interview questions


This article presents a basic Linux system admin interview questions with answers for beginners.

What is the Minix?
Minix is the UNIX clone written by Andrew Tanenbaum at VU University, in Amsterdam when universities were no longer allowed access to the UNIX source code. MINIX also inspired the creation of the Linux kernel.
What does POSIX stand for?
POSIX stands for Portable Operating System Interface for Computer Environments. It is the standard for ensuring compatibility between UNIX versions.
Who posted the source code of Linux kernel on the Internet and invited other programmers to modify and enhance it.?
In 1991 Linus Torvalds, a 21-year-old student at the University of Helsinki Finland posted the source code of Linux kernel on the Internet and invited other programmers to modify and enhance it.
Are Linux and UNIX are same ?
Linux kernel was built to work like UNIX but doesn’t use any of the UNIX code—this is why Linux is not UNIX. A kernel is the core of any operating system.
Who initiated the GNU Project?
GNU project was initiated by Richard Stallman on 27 September 1983 at MIT. Main motive of this project was to give freedom and control in use of software's. GNU software guarantees these freedom-rights legally via its license. Users are free to run the software, share it, copy it, distribute it, study it and modify it.
Under which licenses Linux kernel released?
The Linux kernel is released under the GNU General Public License version 2 (GPLv2), and is developed by contributors worldwide.
What does GPL mean?
GPL stands for General Public License and it was created to protect the intent of the GNU project.
Linux was originally created to run on what platform?
Linux was originally created to run on the Intel x86 platform.
Name the Linux services which provides network printing.
CUPS provide network printing between Linux systems. It can be used with Samba service to extend network printing to windows systems.
Which Linux service is used to provide network file storage ?
NFS service is used to provide file sharing.
Which Linux service is used as a database server ?
MySQL and PostgreSQL are Linux database server.
Which Linux service is used to turn a Linux system in proxy server ?
Squid service can be used to turn any Linux system into an in proxy server.
Which components of Linux provides pre-written code that a developer can use ?
Linux libraries contain pre-written code that a developer can reuse in their applications.
Your company purchased 5 new laptops. Laptop have Intel core i3 processor and Window 8 installed. Your network admin wants to install RHEL on them, but is concerned that it cannot be done because they already have Window 8 installed. Can this be done ?
Yes you can install any operating system as long as the hardware is compatible. Hardware and operating systems are modular. Computer hardware is not tied in any way to a particular OS. Every OS have some minimum hardware requirements, if your hardware meets with that requirements, you can install that OS.
You are a network administrator, your company wants you to download the source code of latest Linux kernel for the developer team. Can you do this?
Source code of Linux kernel is available under the GPL license. Under the GPL, you are free to download the Linux source code and modify it.
Your company have less funds but need a reliable file server set up? Which OS and file server service can you use ?
Use Linux operating with NFS file service.
You have purchased new laptop and want to resell old one, but you don't want to violate any licensing for OS. What can you do to avoid violating a software license?
You can install Linux OS. All major software's for Linux are available under the GPL, those you can use without violating any software license.


RHCE Interview Questions and Answers


This article presents basic interview questions with answers for RHCE candidates.
Which version of RHEL officially supports LUKS encryption?
From version 6 or higher LUKS encryption is officially supported by RHEL.
What is the default virtualization technology for RHEL6 ?
Default virtualization technology is KVM.
Can you configure KVM Virtual machine on 32 bit system ?
No, KVM virtualization requires at least 64 bit system.
Which remote management service is allowed through the default firewall and by default installed in RHEL?
By default SSH is always installed in RHEL. SSH uses port 22 which is allowed through the default firewall rules.
Which standard directory is used by vsFTP server for file sharing ?
Default Standard directory for ftp is /var/ftp/pub.
What is default mode of SELinux during the installation of RHEL ?
·      In RHEL5 you have to choose the mode which you want.
·      From RHEL6 default mode is Enforcing during the installation.
However you can change the mode of SELinux after installation, only difference between RHEL5 and RHEL6 is that in RHEL5 asks you to choose the mode while RHEL6 does not let you to choose the mode during the installation.
Which standard directory is used by Apache web server for HTML files ?
standard directory for HTML files is /var/www/html
What is the default partition layout during the installation ?
Default partition Layout is the LVM.
Which necessary partition cannot be a part of logical volume group ?
boot partition cannot be a part of logical volume group. You must have create it as a regular partition.
Which partitions are recommended for custom layout of partition ?
·      /
·      /boot
·      /home
·      swap
What step during the installation could you take to prevent a program from creating temporary files that fill up the entire space ?
You can create a separate /tmp partition prevents a program from creating temporary files that fill up the entire filesystem.
What is the kickstart ?
kickstart is a installation method used in RHEL. A kickstart installation is started from a kickstart file, which contains the answers to all the questions in the installation program.
Name any of two third party distribution based on RHEL6 source code.
CentOS and Scientific Linux
Which Log file contains all installation message?

install.log.syslog file contains all messages that were generated during the installation.

Interview Questions For Linux Technician


This article provides most frequently asked interview questions with answers for Linux Technician.
You are tasked to build a new Linux workstation. User wants to install a word processor and spreadsheets that offers a similar version for Microsoft Windows system. Which office suite should you install?
You should use Apache OpenOffice. Its free and open source project. And works fine on both Window and Linux systems.
A technician uses the ps command to see what processes are running. When the current running processes are shown, he notices a process that he terminated 10 minutes ago by using the kill command is still running. What command should he use next to terminate this process?
He should use -9 argument with kill command that will send a kill signal to the process. This will terminate the specific process immediately.
A technician quickly notices a kernel error message on the screen during the boot process. Unfortunately, the error message disappear so quickly for the technician to read it all. What log directory can the technician use to examine boot-time messages?
Linux system keeps almost all log files under the /var/log directory. Most of the boot messages are kept in buffer, which can be accessed by using the dmesg command. He can examine the /var/log/dmesg.log file. For boot time message he can also check the /var/log/boot.log file.
A technician wants to view a list of all running processes on the server. How can he do this?
He should use the ps command with -ef argument. ps -ef command will show a list of all running process.
Where inittab file is located?
Default location of inittab file is /etc directory. This file describes which process would be start at boot time.
A technician want to boot the system in CLI mode on start up. Which runlevel should he assign and in which file ?
He could assign runlevel 3 as the default runlevel in /etc/inittab file.
What program a technician can use to analyze program's core dump files and to debug the application while it is actually running?
He can use gdb program to analyze program's core dump files and also debug the application while it is actually running.
As a technician you want to shutdown the Linux system. What command should you use ?
You could use shutdown command.
As a technician you need to perform a scheduled shutdown that will occur in 10 minutes. What should you use to shut down the server in 10 minutes.?
You can use -h argument with shutdown command which allows you to specify the time in second. To shutdown the system in 10 minute you should run shutdown -h 600 command.
What command will halt the system?
halt will halt the system.
As a technician you need to restart the Apache Web Server. What command should you use.?
You could use following command to restart the Apache web server.
#service httpd restart
Which command will restart the FTP Server?
#service vsftpd restart
Above command will restart the FTP server.
What line printer control command is used to control the operation of the line printer system?
lpc command is used with various argument to control the operations of line printer system.
A technician wants to terminate an active spooling daemon on the local host immediately and then disables printing for the specified printers. What command should he use?
He should use lpc command with abort options. lpc abort lpc abort terminates an active spooling daemon on the local host immediately and then disables printing for the specified printers,
What print command stops a spooling daemon after the current job completes and disables printing?
The lpc stop command stops a spooling daemon after the current job completes and disables printing
What command allows you to directly see what jobs are currently in a printer queue?
The lpc command allows you to directly see what jobs are currently in a printer queue
A technician wants to halt the Linux server. What command should he use ?
He can use init 0 command to halt the Linux server.
What line printer command lets you remove print jobs from the printer queue?
The lprm command will let you remove print jobs from the printer queue.
What is the default text editor of Linux which include almost every version of Linux?
Default editor of Linux is vi editor that can used to edit any ASCII text.
What command is used for combining a large number of files into one single file for archival to tape?
vi is a text editor that can be used to edit any ASCII text. It is especially useful for editing programs.
Where do all your configurations for your services, programs, and daemons reside by default?
By default, all configurations for your services, programs, and daemons reside in the /etc directory.
What type of backup tape will only back up files that have changed since the previous backup and clear the archive bit?
An Incremental backup will backup only files that have changed since the previous backup and clear the archive bit.
Which argument is used with tar command to create a new archive file?
-c argument is used to create new archive file.
Which argument is used with tar command to extract the files from archive ?
-x argument is used with tar command to extract the files form archive.
What is default name of super or administrator account name in Linux?
Super or administrator account in Linux is known as root user.
A technician is going to install Linux on a workstation. The technician wants to customize the installation. What type of installation will the technician use to customize the installation?
Only a custom installation can be used to customize what is installed during an installation. A custom installation will allow you to choose what packages you want to install and what packages you don’t want to install.
Where is the password file for Linux located?
The password file for Linux is located by default in the /etc/passwd location.
Which program is mostly used for remote login securely in Linux?
SSH is used for secure login. SSH is the replacement of old unsecure services like telnet.
What file contains a list of user names that is not allowed to log in to the FTP server?
The ftpusers file contains a list of usernames that a Linux administrator has previously set to not allow specific users to login to the FTP server. ftpusers file is located in /etc/vsftpd directory.
Which command can be used to schedule recurring tasks?
Cron command can be used to set scheduled recurring tasks.
In which directory Linux store crontab files for particular users?
The /var/spool/cron is the directory where user’s crontabs are saved with a directory for each user in which all user’s cron jobs are stored.
What command should you use to activate a swap partition?
swapon command is used to activate the swap partition.
A technician is verifying the network configuration of a Linux server. Which command he should used to accomplish this?
ifconfig is the proper command to examine network configuration.
A technician wants to assign IP addresses to all the systems that will connect to the server automatically. What type of server he should set up?
He should set up DHCP Server which assigns IP address to client automatically on start up.
A technician wants to add a new user to the current domain. What command will the technician use to accomplish this?
He should use useradd command followed by the username will create a new user or update default new user information. You need to specify the password separately with the passwd command.
What option a technician can use with usermod command to unlock to user's password?
The -U option is used with usermod command to unlock the user's password.
What option of the mkfs command should you use to check the device for bad blocks before building the file system?
The –c option when used with the mkfs command will check the device for bad blocks before building the file system.
What at command argument will send mail to the user when the job has completed, even if there was no output?
-m argument with at command will send mail to the users when the job has completed even if there was no output.
A user wants to verify the current active shell. Which command will he use?
He should use the env command to verify the current active shell
What command can a technician use to search for a specific file?
He can use either find or locate command to search for a specific file.
How can you send the output of a file to another file?
The > option is used to send the output of a file to another file.
What is the -t option with fsck command used for?
The –t option used with fsck is used to specify the type of filesystem to be checked.
Which utility should you use to display the CPU processes?
top utility lets you see all on one screen how much memory and CPU usage that you are currently using, and also the resource usage by each program and process.
What command can you use to obtain information about your serial port resource usage, such as IRQ and IO addresses?
setserial is a utility that you can use to obtain information about serial port resource usage, such as IRQ and IO addresses.
A technician wants to delete the a user account. Which command should he use?
The userdel command is used to delete a user from the system.
Which command is used to change from one directory to another?
cd command is used to navigate the Linux hierarchical file system structure, use the cd command to change from one directory to another.
A user wants to copy a file from the /tmp directory to the his home directory. Which command would he use?
He can use cp command to copy the files from one directory other directory.
What is the file extension of Red Hat Package manager?
.RPM extension is associated with the Red Hat Package manager
What command can you use to mount a CD-ROM drive?
mount command will mount the CD-ROM.
A technician wants to monitor connections to a Linux server. Which command should the technician use?
He should use netstat command. Netstat is a perfect way to see and monitor the both inbound and outbound connections. This command also be used to view packet statistics so you can see how many packets have been sent and received.
Which command a user can use to exit a login shell?
The logout or exit command will exit him from a login shell.
A technician is having problems connecting to a mail server. What command can he use to test if the mail server is on the network?
He can use ping command to test connectivity between local system and remote server.