Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
307 views
20 Linux Commands Interview Questions & Answers
nnvb
Uploaded by
Ajit Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save 20 Linux Commands Interview Questions & Answers For Later
Download
Save
Save 20 Linux Commands Interview Questions & Answers For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
307 views
20 Linux Commands Interview Questions & Answers
nnvb
Uploaded by
Ajit Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save 20 Linux Commands Interview Questions & Answers For Later
Carousel Previous
Carousel Next
Save
Save 20 Linux Commands Interview Questions & Answers For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 8
Search
Fullscreen
LinuxTechi Home How To Commands Shell Scripting Linux Interview Linux ebooks Write For LinuxTechi Contact Us About Us Linux Interview as 6 20 Linux Commands Interview Questions & Answers Bor You Emil Ib by Pradeep Kumat- Published December 21, 2014- Updated lune 19, 2016 Q:1 How to check current run level of a linux server ? ‘Ans: ‘who -r' & ‘runlevel’ commands are used to check the current runlevel of a linux box. inti Linux Techi Q:2 How to check the default gatway in linux ? ‘Ans: Using the commands “route -n* and “netstat -nr* , we can check default gateway. Apart from the default gateway info , these commands also surtalones display the current routing tables apo rt oni nacconande cen gnc rm!(Q:3 How to rebuild initrd image file on Linux ? ‘Ans: In case of CentOS 5.X / RHEL 5.X , mkinitrd command is used to create initrd file , example is shown below : 4 mkinitrd -f-v /boot/initrd-$(uname -1).img S(uname -1) If you want to create initrd for a specific kernel version , then replace “uname -r' with desired kernel In Case of CentOS 6X / RHEL 6.X , dracut command is used to create initrd file example is shown below : dracut -£ Above command will create the initrd file for the current version. To rebuild the initrd file for a specific kernel , use below command : 4 dracut -finitramfs-2.x.2x-%.016.x86_64.img 2.x.20-9%.016.x86_64 (Q:4 What is cpio command ? Ans: cpio stands for Copy in and copy out. Cpio copies files, lists and extract files to and from a archive (or single fie) (Q:5 What is patch command and where to use it ? Ans: As the name suggest patch command is used to apply changes ( or patches) to the text file. Patch command generally accept output from the diff and convert older version of files into newer versions. For example Linux kernel source code consists of number of files with millions of lines , so whenever any contributor contribute the changes , then he/she will be send the only changes instead of sending the whole source code. Then the receiver will apply the changes with patch command to its original source code. Create a diff file for use with patch, 4 diff -Naur old_file new file >diff_file ep dr cont nacconmande cen gnc! Recent CommentsTags Fedora 25 Workstation Installation Guide with Screenshots How to Install and Customize ONLYOFFICE Fer Desktop Editors on Debian/Ubuntu/Linux Mint —— Katello - Download Yum Repositories and Register = clients for patching November 2, 2016 How to Manage Kernel Modules in Linax: How to Install Katello 5.2 on CentOS 7.x November 14,2016 ‘Top 10 Linux Distros for Desktop /Laptop November 4, 2016ep dr oni nacconmarde en gners ‘Where old file and new file are either single files or directories containing files. The r option supports recursion of a directory tree. Once the diff file has been created, we can apply it to patch the old file into the new file: patch < diff file Q:6 What is use of aspell ? Ans: As the name suggest aspell is an interactive spelling checker in linux operating system. The aspell command is the successor to an earlier program named ispell, and can be used, for the most part, as a drop-in replacement. While the aspell program is mostly used by other programs that require spell-checking capability, it can also be used very effectively as stand-alone tool from the command line. Q:7 How to check the SPF record of domain from command line ? ‘Ans: We can check SPF record of a domain using dig command. Example is shown below : linuxtechi@localhost:~$ dig TXT google.com Q:8 How to identify which package the specified file (/etc/fstab) is associated with in linux ? Ans: # rpm -af etc/fstab Above command will list the package which provides file “/ete/fstab” Q:9 Which command is used to check the status of bondO ? ‘Ans: cat /proc/net/bonding/bondo Q:10 What is the use of /proc file system in linux ? Ans: The /proc file system is @ RAM based file system which maintains information about the current state of the running kemel including details. on CPU, memory, partitioning, interrupts, 1/O addresses, DMA channels, and running processes. This file system is represented by various files tober 50,2016 ‘Multi Node Openstack ‘Newton’ Installation = Steps on Centos 7 october 2, 2016 ERE vbuntu 16.10 (vakkety © © Yak) Desktop Installation — ide (ctober 20,2016 Next» Facebookwhich do not actually store the information, they point to the information in the memory. The /proc file system is maintained automatically by the system. (Q:11 How to find files larger than 10MB in size in /usr directory ? ‘Ans: # find /usr -size +10M Q:12 How to find files in the /home directory that were modified more than 120 days ago ? ‘Ans: # find /home -mtime +120 Q:15 How to find files in the /var directory that have not been accessed in the last 90 days ? ‘Ans: # find /var -atime -90 Q:14 Search for core files in the entire directory tree and delete them as found without prompting for confirmation ‘Ans: # find /-name core exec 1m {}\; Q:15 What is the purpose of strings command ? Ans: The strings command is used to extract and display the legible contents of a non-text file Q:16 What is the use tee filter ? Ans: The tee filter is used to send an output to more than one destination. It can send one copy of the output toa file and another to the screen (or some other program) ifused with pipe. linuxtechi@localhost:~$ Il/etc [nl | tee /Amp/ll.out In the above example, the output from Il is numbered and captured in ‘Amp/llout fil. The output is also displayed on the screen. Q:17 What would the command export PSI = "SLOGNAME@ ‘hostname*\SPWD: do? ep dr oni nacconmande en gn‘Ans: The export command provided will change the login prompt to display username, hostname, and the current working directory. (Q:18 What would the command II | awk ‘{print $3,"owns",$9)' do ? Ans: The Il command provided will display file names and their owners. Q:19 What is the use of at command in linux ? Ans: The at command is used to schedule a one-time execution of a program in the future. All submitted jobs are spooled in the /var/spool/at directory and executed by the atd daemon when the scheduled time arrives. Q:20 What is the role of Ispei command in linux ? Ans: The Ispei command displays information about PCT buses and the devices attached to your system. Specify -v, -vv, or -vwv for detailed output. With the -m option, the command produces more legible output. ep dr oni nacconmande en gnRelated Posts [irswdhes) LinuxTecht ‘server Cinux Unix Interview Interview [iad usstons & Questions & Answers ne Server Interview Virtualization command examples Quasions &Inteniew famples for beganas in nue Answers Questions & beginners Slim Shell How toinstall—_2Sintenew seeptng Docker om CentOS. Questions for (Quetions te Aministrto Job ‘Tags: nx commands interview questions € Fedora 21 Desktop Installation} Install VLC Multimedia player > Steps with Sereenshots fon Ubunty 14.10 pve rst con cornea. macesven ‘Una Comma Hever Aras 3 Responses Comments 3 - Pingbacks 0 Ray © December 25,2014 at 459 pm Inthe answer to Q14, the find command also has a ‘delete’ option. find /-name core -dolete Reply dham © January 29, 2015 at 1:58am ‘There is no option to ada “deete” find /-name core -execrm {)\; Reply Pradeep Kumar © January 0, 2015 at 11:48 * Mian, delete option is ther, for your reference just do "man find” and search delete word, Reply Leave a Reply Comment Name * mai pw dr contnacconande teen eines!Website ight « =56 Oo Aa Linaechi Lino Tutors & Guides © 2016. A ight Reserve o Thiswrkis cesed nde Cetve Gammon Atriuion-NenCommeri 40 International License. Content of this site cannot be republished either online or offline without our permissions. apo rt oni nacconande cen gnc rm!
You might also like
Linux Interview Questions
PDF
No ratings yet
Linux Interview Questions
134 pages
AIX Basicks
PDF
No ratings yet
AIX Basicks
21 pages
Aptean Interview Question CCAT
PDF
No ratings yet
Aptean Interview Question CCAT
24 pages
1 Linux Interview Questions
PDF
No ratings yet
1 Linux Interview Questions
1 page
1 Unix Linux Interview Questions and Answers
PDF
No ratings yet
1 Unix Linux Interview Questions and Answers
8 pages
Top 30 Linux System Admin Interview Questions
PDF
No ratings yet
Top 30 Linux System Admin Interview Questions
8 pages
Linux Interview Questions: What Is Kernel? Explain The Task It Performs
PDF
No ratings yet
Linux Interview Questions: What Is Kernel? Explain The Task It Performs
6 pages
Red Hat Linux Interview
PDF
No ratings yet
Red Hat Linux Interview
8 pages
AIX Commands
PDF
No ratings yet
AIX Commands
66 pages
US Linux Resume
PDF
No ratings yet
US Linux Resume
4 pages
Linux Interview
PDF
No ratings yet
Linux Interview
35 pages
Ansible Sample Resume 2
PDF
No ratings yet
Ansible Sample Resume 2
4 pages
My Resume
PDF
No ratings yet
My Resume
3 pages
Linux Internals Interview Question PDF
PDF
No ratings yet
Linux Internals Interview Question PDF
7 pages
Top 100 Linux Interview Questions
PDF
No ratings yet
Top 100 Linux Interview Questions
8 pages
Installation Guide: High Availability Cluster Multi-Processing For AIX
PDF
No ratings yet
Installation Guide: High Availability Cluster Multi-Processing For AIX
148 pages
AIX Sy
PDF
No ratings yet
AIX Sy
1 page
VXVM Interview Questions
PDF
100% (3)
VXVM Interview Questions
18 pages
Linux Interview Questions
PDF
No ratings yet
Linux Interview Questions
21 pages
Linux Resume Edited
PDF
67% (3)
Linux Resume Edited
3 pages
24 Iostat, Vmstat and Mpstat Examples For Linux Performance Monitoring
PDF
No ratings yet
24 Iostat, Vmstat and Mpstat Examples For Linux Performance Monitoring
10 pages
Aix Quick Sheet
PDF
No ratings yet
Aix Quick Sheet
2 pages
UNIX SHELL PROGRAMMING Micro Complete
PDF
No ratings yet
UNIX SHELL PROGRAMMING Micro Complete
21 pages
Linux Interview Questions
PDF
No ratings yet
Linux Interview Questions
23 pages
AWS Command Line Interface: User Guide
PDF
No ratings yet
AWS Command Line Interface: User Guide
110 pages
Linux Program
PDF
No ratings yet
Linux Program
22 pages
Top 60 Linux Interview Questions & Answers
PDF
No ratings yet
Top 60 Linux Interview Questions & Answers
15 pages
RHCE Notes
PDF
No ratings yet
RHCE Notes
58 pages
Srinivas Resume
PDF
No ratings yet
Srinivas Resume
3 pages
Apache Hadoop Commands
PDF
100% (1)
Apache Hadoop Commands
8 pages
Linux Interview
PDF
No ratings yet
Linux Interview
36 pages
Linux - Part Ii: Asad 1/1/2012
PDF
No ratings yet
Linux - Part Ii: Asad 1/1/2012
9 pages
Linux Administration - Linux Interview Questions 7
PDF
No ratings yet
Linux Administration - Linux Interview Questions 7
5 pages
Red Hat Enterprise Linux-6-Storage Administration Guide-En-US
PDF
No ratings yet
Red Hat Enterprise Linux-6-Storage Administration Guide-En-US
224 pages
Shell Aix PDF
PDF
No ratings yet
Shell Aix PDF
115 pages
Redhat Cluster
PDF
100% (1)
Redhat Cluster
120 pages
Pritikant Jena: Professional Synopsis
PDF
No ratings yet
Pritikant Jena: Professional Synopsis
2 pages
Linux
PDF
No ratings yet
Linux
13 pages
Basics Linux Commands
PDF
No ratings yet
Basics Linux Commands
12 pages
A - Z Linux Commands - Overview With Examples PDF
PDF
No ratings yet
A - Z Linux Commands - Overview With Examples PDF
39 pages
30 Things To Do After Minimal RHEL & Centos 7
PDF
No ratings yet
30 Things To Do After Minimal RHEL & Centos 7
17 pages
AIX Boot Process
PDF
No ratings yet
AIX Boot Process
99 pages
Red Hat Enterprise Linux-9-9.1 Release Notes-En-Us
PDF
No ratings yet
Red Hat Enterprise Linux-9-9.1 Release Notes-En-Us
158 pages
Ansible Training Course
PDF
No ratings yet
Ansible Training Course
12 pages
Samba On AIX
PDF
No ratings yet
Samba On AIX
14 pages
Linux Network
PDF
No ratings yet
Linux Network
318 pages
The Ultimate Veritas Cluster Server (VCS) Interview Questions PDF
PDF
No ratings yet
The Ultimate Veritas Cluster Server (VCS) Interview Questions PDF
21 pages
Configuring SUDO On AIX
PDF
No ratings yet
Configuring SUDO On AIX
3 pages
Multifunction DAQ Devices: Linux Foundation's LFCS and LFCE Certi Cation Preparation Guide ($39)
PDF
No ratings yet
Multifunction DAQ Devices: Linux Foundation's LFCS and LFCE Certi Cation Preparation Guide ($39)
20 pages
Linux Administration Interview Questions
PDF
No ratings yet
Linux Administration Interview Questions
1 page
Aws Odd Interview Questions
PDF
No ratings yet
Aws Odd Interview Questions
36 pages
Linux InterviewQuestions For Level 2 by Ratnakar
PDF
100% (1)
Linux InterviewQuestions For Level 2 by Ratnakar
286 pages
HP-UX 10x System - Administration
PDF
No ratings yet
HP-UX 10x System - Administration
4 pages
How To Set Linux Process Priority Using Nice and Renice Commands
PDF
No ratings yet
How To Set Linux Process Priority Using Nice and Renice Commands
19 pages
Dracut
PDF
No ratings yet
Dracut
12 pages
Veritas Cluster
PDF
No ratings yet
Veritas Cluster
16 pages
Linux InterviewQuestions For Level 2 by Ratnakar-1-1
PDF
No ratings yet
Linux InterviewQuestions For Level 2 by Ratnakar-1-1
275 pages
01 - Mithun Technologies-Linux-Interview-Questions&Answers - 2021
PDF
No ratings yet
01 - Mithun Technologies-Linux-Interview-Questions&Answers - 2021
23 pages
Linux System Administrator Interview Questions You'll Most Likely Be Asked
PDF
No ratings yet
Linux System Administrator Interview Questions You'll Most Likely Be Asked
19 pages
_Linux_Practice_Questions
PDF
No ratings yet
_Linux_Practice_Questions
11 pages
Linux Admin 5
PDF
No ratings yet
Linux Admin 5
44 pages
Java
PDF
No ratings yet
Java
2 pages
Amcat Syllabus 2016-2017 Exam Pattern, Question Papers
PDF
No ratings yet
Amcat Syllabus 2016-2017 Exam Pattern, Question Papers
27 pages
ECIL Gaurav Issue 7 Electronic Fuze
PDF
No ratings yet
ECIL Gaurav Issue 7 Electronic Fuze
44 pages
Deloitte Sample Paper
PDF
No ratings yet
Deloitte Sample Paper
11 pages
Elitmus Syllabus FGVF& Paper Pattern - 2015
PDF
No ratings yet
Elitmus Syllabus FGVF& Paper Pattern - 2015
8 pages
Elitmus Syllabus FGVF& Paper Pattern - 2015
PDF
No ratings yet
Elitmus Syllabus FGVF& Paper Pattern - 2015
8 pages
0212 Csit 04
PDF
No ratings yet
0212 Csit 04
12 pages
1chap0 Openingnbv
PDF
No ratings yet
1chap0 Openingnbv
30 pages
Patient Monitoring System Using GSM Technology
PDF
No ratings yet
Patient Monitoring System Using GSM Technology
8 pages
04 SQL PDF
PDF
No ratings yet
04 SQL PDF
199 pages
CERNER Interview
PDF
No ratings yet
CERNER Interview
3 pages
Company Email (BANGALORE)
PDF
No ratings yet
Company Email (BANGALORE)
160 pages