1. Explain crontab and how to use it ?
The crontab used for schedule routine work in background process on the system. set up the cronjob a certain run-level starting from minutes but its not working at seconds,
Can set schedule at Min, hour, date, day of month , day of week.
Crontab –l : showing crontab list
Crontab –e : This option is used to edit the crontab for schedule
For example : 00 09 * * * /usr/sbin/perl /usr/local/jobname.pl
Every day run cronjob at 9.00 AM.
Can set schedule at Min, hour, date, day of month , day of week.
Crontab –l : showing crontab list
Crontab –e : This option is used to edit the crontab for schedule
For example : 00 09 * * * /usr/sbin/perl /usr/local/jobname.pl
Every day run cronjob at 9.00 AM.
2. What is the different between yum remove and yum erase commands?
# yum erase package_name
Yum erase : This command removes all packages from server except the config files for those packages. We can use this config whenever want to reinstall them.
# yum remote package_name
Yum remove : This command deletes everything from the package in system.
Yum erase : This command removes all packages from server except the config files for those packages. We can use this config whenever want to reinstall them.
# yum remote package_name
Yum remove : This command deletes everything from the package in system.
3. Give sample entry for a custom repository looks like?
[unique title]
name=Custom Yum Repository
baseurl=ftp://linuxfaq/opt/yum/myreposfile
enabled=1
gpgcheck=1
gpgkey=file://etc/pkg/rpm-gpg/RPM-GPG-KEY-redhat-package-release
name=Custom Yum Repository
baseurl=ftp://linuxfaq/opt/yum/myreposfile
enabled=1
gpgcheck=1
gpgkey=file://etc/pkg/rpm-gpg/RPM-GPG-KEY-redhat-package-release
4. How do you create multipe directory like dir1, dir2, and tmp under /usr/src/?
Create the required directories:
# mkdir –p /usr/src/{dir1,dir2,tmp}
# ls -al
total 21
drwxr-xr-x 8 root root 4096 May 30 14:43 ./
drwxr-xr-x 5 root root 4096 May 30 14:43 ../
drwxr-xr-x 2 root root 4096 May 30 14:43 dir1/
drwxr-xr-x 2 root root 4096 May 30 14:43 dir2/
drwxr-xr-x 2 root root 4096 May 30 14:43 tmp/
# mkdir –p /usr/src/{dir1,dir2,tmp}
# ls -al
total 21
drwxr-xr-x 8 root root 4096 May 30 14:43 ./
drwxr-xr-x 5 root root 4096 May 30 14:43 ../
drwxr-xr-x 2 root root 4096 May 30 14:43 dir1/
drwxr-xr-x 2 root root 4096 May 30 14:43 dir2/
drwxr-xr-x 2 root root 4096 May 30 14:43 tmp/
5. How can you create your own repositories?
We have to Specify which directory created and execute the createrepo command.
for example
for example
6. What command is used to create an RPM package?
rpmbuild
7. What are the five required directories when building RPMS?
The five directories are BUILD, RPMS, SOURCES, SPECS, and SRPMS.
8. What two commands are used for installing packages?
We can use yum and rpm commands for installing packages in system.
9. How do you set up a centralized rsyslog server?
rsyslog is very useful for centralized logging in a server, we need to configure in /etc/rsyslog.conf file and restart rsyslog
Uncomment the following line in the /etc/rsyslog.conf file:
#$ModLoad imudp.so
#$UDPServerRun 514
Uncomment the following line in the /etc/rsyslog.conf file:
#$ModLoad imudp.so
#$UDPServerRun 514
10. Can you tell two commands for view the free space on the system?
The du and df commands are used to view available space on the system.
Interview Questions-1
Interview Questions-3
Interview Questions-L2
do you provide more interview questions?