{"id":6940,"date":"2019-10-07T11:10:03","date_gmt":"2019-10-07T11:10:03","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=6940"},"modified":"2020-05-28T07:16:19","modified_gmt":"2020-05-28T07:16:19","slug":"linux-interview-questions-and-answer-part-8","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/linux-interview-questions-and-answer-part-8\/","title":{"rendered":"Linux Interview Questions and Answer &#8211; Part 8"},"content":{"rendered":"\n<ul class=\"wp-block-list\"><li>What do the following commands do and how would you use them?<\/li><li><code>tee<\/code><\/li><li><code>awk<\/code><\/li><li><code>tr<\/code><\/li><li><code>cut<\/code><\/li><li><code>tac<\/code><\/li><li><code>curl<\/code><\/li><li><code>wget<\/code><\/li><li><code>watch<\/code><\/li><li><code>head<\/code><\/li><li><code>tail<\/code><\/li><li><code>less<\/code><\/li><li><code>cat<\/code><\/li><li><code>touch<\/code><\/li><li><code>sar<\/code><\/li><li><code>netstat<\/code><\/li><li><code>tcpdump<\/code><\/li><li><code>lsof<\/code><\/li><li>What does an&nbsp;<code>&amp;<\/code>&nbsp;after a command do?<\/li><li>What does&nbsp;<code>&amp; disown<\/code>&nbsp;after a command do?<\/li><li>What is a packet filter and how does it work?<\/li><li>What is Virtual Memory?<\/li><li>What is swap and what is it used for?<\/li><li>What is an A record, an NS record, a PTR record, a CNAME record, an MX record?<\/li><li>Are there any other RRs and what are they used for?<\/li><li>What is a Split-Horizon DNS?<\/li><li>What is the sticky bit?<\/li><li>What does the immutable bit do to a file?<\/li><li>What is the difference between hardlinks and symlinks? What happens when you remove the source to a symlink\/hardlink?<\/li><li>What is an inode and what fields are stored in an inode?<\/li><li>How to force\/trigger a file system check on next reboot?<\/li><li>What is SNMP and what is it used for?<\/li><li>What is a runlevel and how to get the current runlevel?<\/li><li>What is SSH port forwarding?<\/li><li>What is the difference between local and remote port forwarding?<\/li><li>What are the steps to add a user to a system without using useradd\/adduser?<\/li><li>What is MAJOR and MINOR numbers of special files?<\/li><li>Describe the mknod command and when you&#8217;d use it.<\/li><li>Describe a scenario when you get a &#8220;filesystem is full&#8221; error, but &#8216;df&#8217; shows there is free space.<\/li><li>Describe a scenario when deleting a file, but &#8216;df&#8217; not showing the space being freed.<\/li><li>Describe how &#8216;ps&#8217; works.<\/li><li>What happens to a child process that dies and has no parent process to wait for it and what\u2019s bad about this?<\/li><li>Explain briefly each one of the process states.<\/li><li>How to know which process listens on a specific port?<\/li><li>What is a zombie process and what could be the cause of it?<\/li><li>You run a bash script and you want to see its output on your terminal and save it to a file at the same time. How could you do it?<\/li><li>Explain what echo &#8220;1&#8221; &gt; \/proc\/sys\/net\/ipv4\/ip_forward does.<\/li><li>Describe briefly the steps you need to take in order to create and install a valid certificate for the site&nbsp;<a href=\"https:\/\/foo.example.com\/\" target=\"_blank\" rel=\"noopener\">https:\/\/foo.example.com<\/a>.<\/li><li>Can you have several HTTPS virtual hosts sharing the same IP?<\/li><li>What is a wildcard certificate?<\/li><li>Which Linux file types do you know?<\/li><li>What is the difference between a process and a thread? And parent and child processes after a fork system call?<\/li><li>What is the difference between exec and fork?<\/li><li>What is &#8220;nohup&#8221; used for?<\/li><li>What is the difference between these two commands?<\/li><li><code>myvar=hello<\/code><\/li><li><code>export myvar=hello<\/code><\/li><li>How many NTP servers would you configure in your local ntp.conf?<\/li><li>What does the column &#8216;reach&#8217; mean in&nbsp;<code>ntpq -p<\/code>&nbsp;output?<\/li><li>You need to upgrade kernel at 100-1000 servers, how you would do this?<\/li><li>How can you get Host, Channel, ID, LUN of SCSI disk?<\/li><li>How can you limit process memory usage?<\/li><li>What is bash quick substitution\/caret replace(^x^y)?<\/li><li>Do you know of any alternative shells? If so, have you used any?<\/li><li>What is a tarpipe (or, how would you go about copying everything, including hardlinks and special files, from one server to another)?<\/li><li>How can you tell if the httpd package was already installed?<\/li><li>How can you list the contents of a package?<\/li><li>How can you determine which package is better: openssh-server-5.3p1-118.1.el6_8.x86_64 or openssh-server-6.6p1-1.el6.x86_64 ?<\/li><li>Can you explain to me the difference between block based, and object based storage?<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>What do the following commands do and how would you use them? tee awk tr cut tac curl wget watch head tail less cat touch sar netstat tcpdump lsof What&#8230; <\/p>\n","protected":false},"author":1,"featured_media":7809,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[4957],"tags":[],"class_list":["post-6940","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/6940","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=6940"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/6940\/revisions"}],"predecessor-version":[{"id":6941,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/6940\/revisions\/6941"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/7809"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=6940"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=6940"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=6940"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}