Interview Questions: Part 1
Files, processes, pipes.
Linux questions come up in interviews for developers, testers, data people, and of course system admins. Here are the classics, with short answers you can give with confidence. Pause, and try each one yourself first.

- Developers, testers, admins
- The classic questions
- Try each one first
Files and permissions
What's the difference between a hard link and a soft link? A soft link points to a name. A hard link is another name for the same data. What does CH mod seven five five do? The owner can do everything, everyone else can read and run. How do you find files bigger than one gigabyte? Find dash size plus one G.
| key | value |
|---|---|
| Soft vs hard link | pointer vs same data |
| chmod 755 | rwx r-x r-x |
| Big files | find / -size +1G |
| Who owns it? | ls -l |
Processes and the system
How do you see what's using the processor? Top, or PSAUX. How do you stop a process that won't quit? Kill, then kill dash nine as a last resort. How do you check disk space? DF dash H. And how do you see which program uses a port? SS dash TLNP.
| key | value |
|---|---|
| Processor hogs | top, ps aux |
| Stuck process | kill, then kill -9 |
| Disk space | df -h |
| Port in use | ss -tlnp |
Text and pipes
What does a pipe do? It sends one command's output into the next command's input. How do you count lines containing error? Grep dash C. What's the difference between greater than, and double greater than? One replaces the file, two appends to it. And what does two greater than do? Redirects errors.
| key | value |
|---|---|
| | | output into input |
| grep -c error | count matching lines |
| > vs >> | replace vs append |
| 2> | redirect errors |
Summary
Links, permissions, processes, ports, and pipes. These are the questions that come up again and again. Next, part two, with networking and scripting.
Key takeaways- ln -s vs ln
- kill -9 last
- > vs >>