From 3c3e84c13e405c86ce16b6aa347c52377725c043 Mon Sep 17 00:00:00 2001 From: Pedro Guimaraes Date: Wed, 4 Feb 2015 10:50:48 -0500 Subject: [PATCH 01/46] Added more https questions --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index fe96cdd..0d652df 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,8 @@ The majority of the questions were collected from: * Describe how 'ps' works. * What happens to a child process that dies and has no parent process to wait for it and what’s bad about this? * How to know which process listens on a specific port? +* Describe briefly the steps you need to take in order to create and install a valid certificate for the site https://foo.example.com. +* Can you have several HTTPS virtual hosts sharing the same IP? ####[[⬆]](#toc) Hard Linux Questions: From d8cddfc9f4331b663d97a8991f7cd45eb7008939 Mon Sep 17 00:00:00 2001 From: Pedro Guimaraes Date: Wed, 4 Feb 2015 10:53:30 -0500 Subject: [PATCH 02/46] Added wildcard question --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0d652df..aca9ae2 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,7 @@ The majority of the questions were collected from: * How to know which process listens on a specific port? * Describe briefly the steps you need to take in order to create and install a valid certificate for the site https://foo.example.com. * Can you have several HTTPS virtual hosts sharing the same IP? +* What is a wildcard certificate? ####[[⬆]](#toc) Hard Linux Questions: From 0d67b9e9b6e3873d268b8b4145d44276fa39342a Mon Sep 17 00:00:00 2001 From: Pedro Guimaraes Date: Wed, 4 Mar 2015 11:08:38 -0500 Subject: [PATCH 03/46] A few more questions added --- README.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index aca9ae2..b98efbc 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ A collection of linux sysadmin/devop interview questions. Feel free to contribut * [andreashappe](https://github.com/andreashappe) * [quatrix](https://github.com/quatrix) * [biyanisuraj](https://github.com/biyanisuraj) +* [pedroguima](https://github.com/pedroguima) The majority of the questions were collected from: @@ -97,10 +98,12 @@ The majority of the questions were collected from: * What does a ```&``` after a command do? * What does ```& disown``` after a command do? * What is a packet filter and how does it work? +* What is Virtual Memory? * What is swap and what is it used for? * What is an A record, an NS record, a PTR record, a CNAME record, an MX record? * Are there any other RRs and what are they used for? * What is the sticky bit? +* What does the immutable bit to a file? * What is the difference between hardlinks and symlinks? What happens when you remove the source to a symlink/hardlink? * What is an inode and what fields are stored in an inode? * Howto force/trigger a file system check on next reboot? @@ -114,10 +117,15 @@ The majority of the questions were collected from: * Describe a scenario when deleting a file, but 'df' not showing the space being freed. * Describe how 'ps' works. * What happens to a child process that dies and has no parent process to wait for it and what’s bad about this? +* Explain briefly each one of the process states. * How to know which process listens on a specific port? * Describe briefly the steps you need to take in order to create and install a valid certificate for the site https://foo.example.com. * Can you have several HTTPS virtual hosts sharing the same IP? * What is a wildcard certificate? +* Which Linux file types to you know? +* What is the difference between a process and a thread? And parent and child processes after a fork system call? +* What's the difference between exec and fork? +* What is "nohup" used for? ####[[⬆]](#toc) Hard Linux Questions: @@ -133,8 +141,9 @@ The majority of the questions were collected from: * I've added my public ssh key into authorized_keys but I'm still getting a password prompt, what can be wrong? * Did you ever create RPM's, DEB's or solaris pkg's? * What does ```:(){ :|:& };:``` do on your system and why you would care about that? -* How trace system call and signal? -* What's happening when the Linux kernel is starting the OOM killer, how does it choose which process to kill first. +* How do you catch a Linux signal on a script? +* Can you catch a SIGKILL? +* What's happening when the Linux kernel is starting the OOM killer and how does it choose which process to kill first? * Describe the linux boot process with as much detail as possible, starting from when the system is powered on and ending when you get a prompt. * What's a chroot jail? * When trying to umount a directory it says it's busy, how to find out which PID holds the directory? @@ -180,7 +189,6 @@ The majority of the questions were collected from: * What is Automake and Autoconf? * ./configure shows an error that libfoobar is missing on your system, how could you fix this, what could be wrong? * Advantages/disadvantages of script vs compiled program. -* What is the difference between fork and thread? And parent and child process in fork system call? * What's the relationship between continuous delivery and DevOps? * What are the important aspects of a system of continous integration and deployment? From dff04bb625ded5c0c7a273e042154e32ffb0093d Mon Sep 17 00:00:00 2001 From: Pedro Guimaraes Date: Wed, 25 Mar 2015 19:53:42 +0000 Subject: [PATCH 04/46] new question --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b98efbc..85ec7f9 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ A collection of linux sysadmin/devop interview questions. Feel free to contribut 1. [Hard Linux Questions](#hard) 1. [Expert Linux Questions](#expert) 1. [Networking Questions](#network) - 1. [DevOp Questions](#devop) + 1. [DevOps Questions](#devop) 1. [Fun Questions](#fun) 1. [Demo Time](#demo) 1. [Other Great References](#references) @@ -124,8 +124,12 @@ The majority of the questions were collected from: * What is a wildcard certificate? * Which Linux file types to you know? * What is the difference between a process and a thread? And parent and child processes after a fork system call? -* What's the difference between exec and fork? +* What is the difference between exec and fork? * What is "nohup" used for? +* What is the difference between these two commands? + * ```myvar=hello``` + * ```export myvar=hello``` + ####[[⬆]](#toc) Hard Linux Questions: @@ -174,7 +178,7 @@ The majority of the questions were collected from: * You have added an IPv4 and IPv6 address to interface eth0. A ping to the v4 address is working but a ping to the v6 address gives yout the response ```sendmsg: operation not permitted```. What could be wrong? -####[[⬆]](#toc) DevOp Questions: +####[[⬆]](#toc) DevOps Questions: * Can you describe your workflow when you create a script? * What is GIT? From cfcc07764ad524856e7db01e78176df851f3efbf Mon Sep 17 00:00:00 2001 From: Pedro Guimaraes Date: Thu, 26 Mar 2015 15:40:25 +0000 Subject: [PATCH 05/46] new questions plus english improvements --- README.md | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 85ec7f9..287c14a 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ A collection of linux sysadmin/devop interview questions. Feel free to contribut 1. [Hard Linux Questions](#hard) 1. [Expert Linux Questions](#expert) 1. [Networking Questions](#network) + 1. [MySQL Questions](#mysql) 1. [DevOps Questions](#devop) 1. [Fun Questions](#fun) 1. [Demo Time](#demo) @@ -48,7 +49,7 @@ The majority of the questions were collected from: * What is HTTP? * What is an HTTP proxy and how does it work? * Describe briefly how HTTPS works. -* What is SMTP? Give the basic scenario of how a mail message is delivered via SMTP! +* What is SMTP? Give the basic scenario of how a mail message is delivered via SMTP. * What is RAID? What is RAID0, RAID1, RAID5, RAID10? * What is a level 0 backup? What is an incremental backup? * Describe the general file system hierarchy of a Linux system. @@ -63,10 +64,10 @@ The majority of the questions were collected from: * How to search for the string "my konfi is the best" in files of a directory recursively? * How to connect to a remote server or what is SSH? * How to get all environment variables and how can you use them? -* I get "command not found" for ```ifconfig -a```. What can be wrong? +* I get "command not found" when I run ```ifconfig -a```. What can be wrong? * What happens if I type TAB-TAB? * What command will show the available disk space on the Unix/Linux system? -* What command is used to lookup DNS records? +* What commands do you know that can be used to check DNS records? * What Unix/Linux commands will alter a files ownership, files permissions? * What does ```chmod +x FILENAME```do? * What does the permission 0750 on a file mean? @@ -78,9 +79,10 @@ The majority of the questions were collected from: * What does CTRL-c do? * What is in /etc/services? * How to redirect STDOUT and STDERR in bash? (> /dev/null 2>&1) -* What is the difference between UNIX and Linux +* What is the difference between UNIX and Linux. * What is the difference between Telnet and SSH? -* Explain the three load averages and what do they indicate +* Explain the three load averages and what do they indicate. + ####[[⬆]](#toc) Medium Linux Questions: @@ -111,7 +113,7 @@ The majority of the questions were collected from: * What is a runlevel and how to get the current runlevel? * What is SSH port forwarding? * What is the difference between local and remote port forwarding? -* What steps to add a user to a system without using useradd/adduser? +* What are the steps to add a user to a system without using useradd/adduser? * What is MAJOR and MINOR numbers of special files? * Describe a scenario when you get a "filesystem is full" error, but 'df' shows there is free space. * Describe a scenario when deleting a file, but 'df' not showing the space being freed. @@ -144,7 +146,7 @@ The majority of the questions were collected from: * What kind of keys are in ~/.ssh/authorized_keys and what it is this file used for? * I've added my public ssh key into authorized_keys but I'm still getting a password prompt, what can be wrong? * Did you ever create RPM's, DEB's or solaris pkg's? -* What does ```:(){ :|:& };:``` do on your system and why you would care about that? +* What does ```:(){ :|:& };:``` do on your system? * How do you catch a Linux signal on a script? * Can you catch a SIGKILL? * What's happening when the Linux kernel is starting the OOM killer and how does it choose which process to kill first? @@ -152,30 +154,44 @@ The majority of the questions were collected from: * What's a chroot jail? * When trying to umount a directory it says it's busy, how to find out which PID holds the directory? * What's LD_PRELOAD and when it's used? -* You run a binary and nothing happens, how do you debug what's doing? +* You ran a binary and nothing happened. How would you debug this? ####[[⬆]](#toc) Expert Linux Questions: -* A running process gets ```EAGAIN: Resource temporarily unavailable``` on reading a socket. How you can close this bad socket/file descriptor without killing the process? +* A running process gets ```EAGAIN: Resource temporarily unavailable``` on reading a socket. How can you close this bad socket/file descriptor without killing the process? ####[[⬆]](#toc) Networking Questions: * What is localhost and why would ```ping localhost``` fail? * What is the similarity between "ping" & "traceroute" ? How is traceroute able to find the hops. -* What command is used to show all open ports and/or socket connections on a machine? +* What is the command used to show all open ports and/or socket connections on a machine? * Is 300.168.0.123 a valid IPv4 address? * Which IP ranges/subnets are "private" or "non-routable" (RFC 1918)? * What is a VLAN? * What is ARP and what is it used for? * What is the difference between TCP and UDP? * What is the purpose of a default gateway? -* What command is used to show the route table for a machine? +* What is command used to show the routing table on a Linux box? * A TCP connection on a network can be uniquely defined by 4 things. What are those things? * When a client running a web browser connects to a web server, what is the source port and what is the destination port of the connection? * How do you add an IPv6 address to a specific interface? * You have added an IPv4 and IPv6 address to interface eth0. A ping to the v4 address is working but a ping to the v6 address gives yout the response ```sendmsg: operation not permitted```. What could be wrong? +* How do you stop a DDoS? + + + +####[[⬆]](#toc) MySQL questions: + +* How do you create a user? +* How do you provide privileges to a user? +* What is the difference between a "left" and a "right" join? +* Explain briefly the differences between InnoDB and MyISAM. +* Describe briefly the steps you need to follow in order to create a simple master/slave cluster. +* Why should you run "mysql_secure_installation" after installing MySQL? +* How do you check which jobs are running? + ####[[⬆]](#toc) DevOps Questions: @@ -213,7 +229,6 @@ The majority of the questions were collected from: * Remove all "*.pyc" files from testdir recursively? * Search for "my konfu is the best" in all *.py files. * Replace the occurrence of "my konfu is the best" with "I'm a linux jedi master" in all *.txt files. -* :interrobang: more on files ... cut, tr, awk ... * Test if port 443 on a machine with IP address X.X.X.X is reachable. * Get http://myinternal.webserver.local/test.html via telnet. * How to send an email without a mail client, just on the command line? @@ -221,8 +236,7 @@ The majority of the questions were collected from: * Find all files which have been accessed within the last 30 days. * Explain the following command ```(date ; ps -ef | awk ‘{print $1}’ | sort | uniq | wc -l ) >> Activity.log``` * Write a script to list all the differences between two directories. -* Write a program in any language you choose, to reverse a file. -* In a log file with contents as ```