For much of the software industry being able to work effectively on a linux server is a job requirement.
Linux is an open source operating system that is used primarily to run servers. One website reports that around 71% of all web servers are running linux.
The typical profile of a developer that might need to know linux well might be something like "Backend Java Developer" or "Fullstack Node.js Engineer". Of course, many other roles such as "DevOps Engineer" or "Network Administrator" will likely have linux listed as a skill on the job description.
Frontend developers are usually expected to have less in the way of server administration skills but it can come in handy. Here is a backend vs frontend primer in case you need a refresher!
Ok, let's get to the questions!
This is as basic as it gets. Name 3 flavors of linux. Linux is an open source operating system, but different "distros" (short for distribution) are maintained by different groups. Some are commercial, most are not.
Here are a few:
This question is asking about the name of a command you would type into the command line on a linux server terminal. I have screenshots at the bottom of this post in case you want to see what I'm talking about.
This is a pretty standard thing to look at when you first SSH into (connect to over the command line) a linux server. You need to get an idea of what processes (programs) are running.
There are many ways to do this, here are few:
ps
(or they might mention some variant like ps aux
)top
(this is like a visual version of ps
)htop
pstree
Another basic skill - is my disk full? It is a very common issue. This is another command line command.
It might sound funny but something as simply as running out of disk space causes many production crashes. Anybody who knows linux should know how to check this, because chances are they had a server crash for exactly this reason!
df
(probably the most common)du
, this reports on directory disk space usage, so still kinda correctHere we are simply asking how you can tell how long the server has been running since it was last restarted. Again, this is a simple one-word command you can run on the command line in your linux server terminal.
The most common answer will be:
uptime
They could also run top
or w
, which has this information (look below for screenshots). Also, a lot of servers are set up to display this information when you first log into a server terminal, so a candidate may mention this.
This is a little bit more advanced. Here we are asking about how much CPU is being used on a linux server. There are several types of load average (which are averaged over different time spans - typically 1, 5 and 15 minutes.)
Basically, most people would run top
and look in the top right hand corner of the screen where it says load average
.
But there are a several other ways to do this:
cat /proc/loadavg
w
, yeah this command is just the letter "w"uptime
- yes the answer to the last question also tells load average.You can learn more about load averages here, if you like.
Here it is on my desktop:
Here it is on a server, you can see it was up for 47 days!