linux interview questions
Linux interview Questions from Tech Arkit:
1).There are three users in linux server A1,B1,c1.
1. provide access to A1 user ftp,telnet ans ssh commands
2.only ssh access to b1 user
3.only telnet access to c1 user
How will you provide access?
first we should edit the sudoers file
vi /etc/sudoers and vi sudo
A1 ALL = nopassword ;/bin/ftp,/bin/telnet,/bin/ssh
B1 ALL = nopassowrd :/bin/ssh
C1 ALL = nopassowrd :/bin/telnet
2).what is firewall?
its a security . which is used to filters and controls the traffic on a predefined set of rules.
firewall rule is defined as the blocks and protects the website .
3).what is selinux & selinux contexts?
system_u: selinux user
object_r : role
passwd_file: selinux type
so =sensivity level
ls -lZ command
How to check the selinux is enable on the file level?
we can execute the command like as the,
ls -lZ command
so in this way we can check it out the selinux is enable on the particular file.
4).How do you check kernel version into linux os ?
we can execute the command like as the,
uname -a comamnd
5).How will you install the packages in linux ?
install web server packages?
using yum and rpm packages to install the packages into linux os .
yum install httpd -y command
so in this way we can install the webserver packages into linux os
rpm -ivh
i - instllations
v-verbose
h-horse
where the package is located
6).How will you check the memeory usage into linux os ?
we can execute the comamnd like as th,
top command
free -m comamnd
cat /proc/meminfo command
7).How will you reduce the LVM size, explain the procedure?
first unount the disk or filesystem
unmount /lv0
we can run the e2fsck to resolve any filesystem errors
e2fscak -f /dev/vg0/il
resize the filesystem
resize2fs /dev/vgo/lv 40m
reduce the lvm size :
lvreduce -L 400m /dev/vg0/lv
next we need the mount the filesystem,
next we need to edit the entries with the fstab filesystem
mount -a
check the filesystem using df -Th command:
8).How will you extend LVM size, explain the procedure>
before then we have to resize the filesystem in linux os:
resize2fs /dev/vg1/lv
lxextend _L +1G /dev/vg1/lv
9).How to check memeory,cpu , usage ,serial no,and model
number?
cat /proc/meminfo
cat /proc/cpuinfo
or else we have to execute the comamnd like as the
dmidecode
10).explain linux boot process?
11).how to monitor cpu utilizations into linux os ?
12).
Comments
Post a Comment