├── README.md ├── answer.md └── question.md /README.md: -------------------------------------------------------------------------------- 1 | # Top-50-Linux-System-Administrator-Interview-Questions 2 | Top 50 Linux System Administrator Interview Questions 3 | -------------------------------------------------------------------------------- /answer.md: -------------------------------------------------------------------------------- 1 | 1. **nslookup** do 2 | 3 | (nslookup is the name of a program that) lets an Internet server administrator or any computer user enter a host name (for example, "whatis.com") and find out the corresponding IP address. It will also do reverse name lookup and find the host name for an IP address you specify. 4 | 5 | 2. To display the top most process utilizing CPU process: 6 | 7 | ``` 8 | ps -eo %cpu,comm,pid,euser | sort -nr | head -10 9 | 10 | ps axo ruser,%cpu,comm,pid,euser | sort -nr | head -n 10 11 | ``` 12 | 3. To check all open ports on a Linux machine and block the unused ports 13 | 14 | ``` 15 | netstat -tulp 16 | netstat -tulpn 17 | 18 | nmap -sU localhost for udp 19 | nmap -v localhost for tcp 20 | 21 | netstat -t(tcp) 22 | netstat -u(udp)or 23 | netstat -tulpn 24 | ``` 25 | to verfy the open ports 26 | 27 | to block u have to use iptable & tcp_wrappers( hosts.deny 28 | file) 29 | 30 | To Block Ports for eg.22 and 80 as requested 31 | > iptables -t filter -A INPUT -s!192.168.0.0/24 (IP which you want to allow) -p tcp -d (destination server IP) --dport 32 | 22 -j DROP 33 | 34 | > iptables -t filter -A INPUT -s!192.168.0.0/24(IP which you 35 | want to allow) -p tcp -d (destination server IP) --dport 36 | 80 -j DROP 37 | 38 | 4. Linux and the different with UNIX? 39 | 40 | Linux Is Just a Kernel. 41 | 42 | Linux is just a kernel. All Linux distributions includes GUI system + GNU utilities (such as cp, mv, ls,date, bash etc) + installation & management tools + GNU c/c++ Compilers + Editors (vi) + and various applications (such as OpenOffice, Firefox). 43 | 44 | However, most UNIX operating systems are considered as a complete operating system as everything come from a single source or vendor. 45 | 46 | [standard diffrent](https://www.linux.com/answers/what-standard-difference-bw-linux-and-unix) 47 | 48 | [more](http://www.cyberciti.biz/faq/what-is-the-difference-between-linux-and-unix/) 49 | 50 | 5. The boot process of Unix System: . 51 | [reference 1](https://www.safaribooksonline.com/library/view/essential-system-administration/0596003439/ch04s01.html) 52 | 53 | [reference 2](http://www.thegeekstuff.com/2011/02/linux-boot-process/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+TheGeekStuff+(The+Geek+Stuff)) 54 | 55 | [reference 3](http://www.golinuxhub.com/2014/03/step-by-step-linux-boot-process.html) 56 | -------------------------------------------------------------------------------- /question.md: -------------------------------------------------------------------------------- 1 | 2 | 1. What does nslookup do? 3 | 4 | 2. How do you display the top most process utilizing CPU process? 5 | 6 | 3. How to check all open ports on a Linux machine and block the unused ports? 7 | 8 | 4. What is Linux? How is it different from UNIX? 9 | 10 | 5. Explain the boot process of Unix System in details. 11 | 12 | 6. How do you change the permissions? How to create a file that’s read-only property? 13 | 14 | 7. Explain SUDO in detail. What are its disadvantages? 15 | 16 | 8. What is the difference between UDP and TCP? 17 | 18 | 9. Describe the boot order of a Linux machine. 19 | 20 | 10. Design a 3-tier web application. 21 | 22 | 11. Sketch how you would route network traffic from the internet into a few subnets. 23 | 24 | 12. How do you know about virtualization? Is it good to use? 25 | 26 | 13. What are different levels of RAID and what level will you use for a web server and database server? 27 | 28 | 14. List some latest developments in open source technologies. 29 | 30 | 15. Have you ever contributed to an open source project? 31 | 32 | 16. Systems engineer or a systems administrator? Explain? 33 | 34 | 17. List some of the common unethical practices followed by a system professional. 35 | 36 | 18. What is the common size for a swap partition under a Linux system? 37 | 38 | 19. What does a nameless directory represent in a Linux system? 39 | 40 | 20. How to list all files, including hidden ones, in a directory? 41 | 42 | 21. How to add a new system user without login permissions? 43 | 44 | 22. Explain a hardlink. What happens when a hardlink is removed? 45 | 46 | 23. What happens when a sysadmin executes this command: chmod 444 chmod 47 | 48 | 24. How do you determine the private and public IP addresses of a Linux system? 49 | 50 | 25. How do you send a mail attachment using bash? 51 | 52 | 26. Tell me something about the Linux distros used on servers. 53 | 54 | 27. Explain the process to re-install Grub in Linux in the shortest manner. 55 | 56 | 28. What is an A record, an NS record, a PTR record, a CNAME record, an MX record? 57 | 58 | 29. What is a zombie process? State its causes? 59 | 60 | 30. When do we prefer a script over a compiled program? 61 | 62 | 31. How to create a simple master/slave cluster? 63 | 64 | 32. What happens when you delete the source to a symlink? 65 | 66 | 33. How to restrict an IP so that it may not use the FTP Server? 67 | 68 | 34. Explain the directory structure of Linux. What contents go in /usr/local? 69 | 70 | 35. What is git? Explain its structure and working. 71 | 72 | 36. How would you send an automated email to 100 people at 12:00 AM? 73 | 74 | 37. Tell me about ZFS file system. 75 | 76 | 38. How to change the default run level in a Linux system? 77 | 78 | 39. How would you change the kernel parameters in Linux? 79 | 80 | 40. State the differences between SSH and Telnet. 81 | 82 | 41. How would you virtualize a physical Linux machine? 83 | 84 | 42. Tell me about some quirky Linux commands. 85 | 86 | 43. Explain how HTTPS works. 87 | 88 | 44. Do you know about TOR browser? Explain its working. 89 | 90 | 45. How to trigger a forced system check the next time you boot your machine? 91 | 92 | 46. What backup techniques do you prefer? 93 | 94 | 47. Tell me something about SWAP partition. 95 | 96 | 48. Explain Ping of Death attack. 97 | 98 | 49. How do you sniff the contents of an IP packet? 99 | 100 | 50. Which OSI layer is responsible for making sure that the packet reaches its correct destination? 101 | 102 | --------------------------------------------------------------------------------