Linux Interview Questions and Answers – Part 2

1. What is the command for clean the screen ?
Clear

2. What is the command for finding current working directory?
Pwd (Present working Directory)

3. What is the command for finding Os version ? Give the all options ?
Uname –a
-a, –all
print all information, in the following order:
-s, –kernel-name
print the kernel name
-n, –nodename
print the network node hostname
-r, –kernel-release
print the kernel release
-v, –kernel-version
print the kernel version
-m, –machine
print the machine hardware name
-p, –processor
print the processor type
-i, –hardware-platform
print the hardware platform
-o, –operating-system
print the operating system
–help
display this help and exit
–version
output version information and exit
Cat /proc/version
Cat /etc/*-release
Cat /etc/issues

4. What is the command to check the Os Bit?
uname -a
grep flags /proc/cpuinfo
o/p:
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm

CPU Modes:

ñ lm flag means Long mode cpu – 64 bit CPU
ñ Real mode 16 bit CPU

5.What is the command to Check the Kernal verssion?
$ uname -r

Output: 2.6.22-14-generic
            2 : Kernel version
6 : The major revision of the kernel
22 : The minor revision of the kernel
14 : Immediate fixing / bug fixing for critical error
generic : Distribution specific sting. For example, Redhat appends string such as EL5 to indicate RHEL 5 kernel.

less /proc/version
more /proc/version
cat /proc/version
rpm -q kernel

6.What is the command to Check the kernal full information?
$ uname -r
Output: 2.6.22-14-generic
            2 : Kernel version
6 : The major revision of the kernel
22 : The minor revision of the kernel
14 : Immediate fixing / bug fixing for critical error
generic : Distribution specific sting. For example, Redhat appends string such as EL5 to indicate RHEL 5 kernel.

less /proc/version
more /proc/version
cat /proc/version
rpm -q kernel

7.What is the command to check who are loging to the server’s?
last
who
whoami
w
user

8.what is the meaning of ( -i , -r , -f ) while copying the files?
-f, –force
If an existing destination file cannot be opened, remove it and try again
            -i, –interactive
prompt before overwrite
            -R, -r, –recursive
copy directories recursively

Sign-up for our email newsletter and get free job alerts, current affairs and GK updates regularly.
Subscribe Here (or)

Leave a Reply

Your email address will not be published. Required fields are marked *


five − = 1

Popup Dialog Box Powered By : XYZScripts.com
  • RSS
  • Facebook
  • Google+
  • Twitter