‹ Back to Home

The 30 Linux commands you will actually type at work

Every server, Docker image and CI job is Linux. Here are the 30 commands that cover daily work, campus interviews, and that first SSH into staging — files, chmod, grep, processes and keys.

Keerthika 6 min read
Follow on Google
Programming The 30 Linux commands you will actually type at work 6 min left Follow on Google

TamilTech AI summary

  • Thirty commands cover files, chmod, grep, processes, ports and SSH
  • chmod 777 and a careless rm -rf are the classic first-week disasters
  • The same commands work on your laptop, in Docker, in CI and over SSH

AI-assisted summary, checked by the TamilTech editorial team.

0:00
0:00
🔒 Listen is for subscribers. Subscribe
  • Every server, Docker image and CI job you touch is Linux. The pretty GUI will not come with you.
  • Thirty commands cover daily work: files, chmod, grep, processes, ports and SSH.
  • Campus interviews and product on-call in Indian teams still ask you to type these live.
  • Practise on your laptop. The same fingers work on a VM, a container and a CI runner.

What is the Linux command line, in one line?

You join a Chennai product team. First ticket: SSH into staging and tail the logs. No mouse. A black screen. A cursor. The Linux command line is that cursor — a place you talk to the machine with short verbs: list, copy, search, kill, connect.

You do not need 400 manual pages. You need the 30 commands that show up in Dockerfiles, CI jobs, and week one at work. Open a terminal. Type. Read the reply. That loop is the skill.

How do you move around files without getting lost?

Slack says the repo lives at /opt/app. Your laptop GUI cannot help you there.

pwd prints the folder you are standing in. ls -lah lists files, hidden ones included, with sizes you can read. cd jumps. mkdir -p builds nested folders without drama. touch creates an empty file. cp copies. mv moves or renames. rm deletes. cat prints a small file. less lets you scroll a big one. tail -f follows a log as it grows.

That is your first eleven commands. You will type them every single day.

pwd
ls -lah
mkdir -p ~/cli-lab/src ~/cli-lab/logs
touch ~/cli-lab/src/app.py
echo "hello from cli-lab" > ~/cli-lab/logs/app.log
cp ~/cli-lab/logs/app.log ~/cli-lab/logs/app.log.bak
tail -n 20 ~/cli-lab/logs/app.log

Tab-complete names. Run ls before rm. Delete a named file, not a wildcard, until your hands slow down on purpose.

How do permissions and chmod actually work?

Every Linux file has an owner, a group, and a permission mask. ls -l shows it as rwx for the user, the group, and everybody else.

chmod changes that mask. chmod u+x deploy.sh lets you run a script you just wrote. chmod 644 is the boring, correct default for a config you own and others may read. chown changes the owner. sudo runs one command as root when the system says permission denied.

chmod 777 is not a fix. It is how a shared VM becomes an open house. Change the owner. Set the one bit you actually need.

touch ~/cli-lab/deploy.sh
echo "echo deploying" > ~/cli-lab/deploy.sh
chmod u+x ~/cli-lab/deploy.sh
ls -l ~/cli-lab/deploy.sh

How do grep, find and pipes save you hours?

Logs are long. Repos are wide. Your eyes are not a search engine.

grep finds text. grep -R "TODO" --include=".py" . walks Python files from here. find locates files by name, age or size. find . -name ".log" -mtime -1 is logs from the last day.

A pipe, the | character, sends one command's output into the next. ps aux | grep nginx. sort | uniq -c counts repeats. wc -l counts lines. xargs turns a list of file names into arguments for another tool.

cd ~/cli-lab
grep -R "hello" --include="*.log" .
find . -name "*.log" -mtime -1
ps aux | head -n 5
wc -l logs/app.log

Learn these seven: grep, find, xargs, wc, sort, uniq, and the pipe. Half of "I am good on the terminal" is just this combo.

How do you check processes and open ports?

The app "is running" but the page is dead. Two questions matter. Is the process alive? Is the port open?

ps aux lists processes. top is the live view — q to quit. kill -15 PID asks a process to exit politely. kill -9 is the last resort, not the first tap.

ss -tulpn shows listening TCP and UDP ports. lsof -i :3000 names who grabbed 3000. curl -I http://127.0.0.1:3000 asks if anything answers. If your lead says check if 8080 is taken, they mean ss or lsof, not a browser refresh.

ps aux | head -n 5
ss -tuln

These five — ps, top, kill, ss, lsof — plus curl, cover most "it is down" mornings. If ss hides process names, rerun it with sudo. Read the output before you kill anything that looks important.

How do you SSH into a server without the usual panic?

Production is not on your laptop. SSH is how you sit at another machine's keyboard over the network.

ssh user@host logs you in. scp copies a file across. ssh-keygen -t ed25519 makes a modern key pair. ssh-copy-id plants the public key on the server so you stop typing the password every time.

Never paste a private key into Slack. Never chmod 777 on ~/.ssh. The folder stays 700. The private key stays 600. Password SSH is how people get locked out during a deploy. Keys are the default in any team that has been burnt once.

ssh-keygen -t ed25519 -C "dev@laptop" -N "" -f ~/.ssh/id_ed25519_lab
ls -l ~/.ssh/id_ed25519_lab ~/.ssh/id_ed25519_lab.pub

The empty passphrase is only for this lab key. On a real work key, set a passphrase. Skip the command if that lab file already exists. A dummy login such as ssh -i ~/.ssh/id_ed25519_lab [email protected] will fail unless you own that box. That is fine. You practised the typing.

That is the set of 30: pwd, ls, cd, mkdir, touch, cp, mv, rm, cat, less, tail, chmod, chown, sudo, grep, find, xargs, wc, sort, uniq, ps, top, kill, ss, lsof, curl, ssh, scp, ssh-keygen, ssh-copy-id.

Which mistakes get people into trouble?

rm -rf fired at the wrong folder. A space after a slash you did not see. chmod 777 on a web root because a blog said it would help. Staying as root because sudo felt slow.

grep on a huge log with no path, so the disk thrashes. Committing ~/.ssh/id_ed25519 to Git. Running tail without -f and wondering why the file looks frozen. kill -9 on the database because it was "stuck" for ten seconds.

The pattern is the same. A command that was safe on a toy folder, pointed at the whole machine.

What should you do now?

Campus interviews at Indian services firms still sit you at a shared Linux box and ask you to find a file, fix a permission, and grep a log. Product teams — think Zoho, Freshworks, Flipkart-style stacks, and any startup on Kubernetes — assume you can SSH, read a log, and say why port 8080 is taken. CI is Linux. Docker is Linux. If you only know the VS Code GUI, the first on-call feels like a different job.

A terminal is already on the machine. Ubuntu, Fedora or Debian cost nothing. Windows users can use WSL. You do not need a paid course to learn these 30.

Open a terminal tonight. Create ~/cli-lab. Make src and logs. Write a line to a file. chmod u+x a tiny script. grep a word. find the log. Run ss and read your own listening ports. Generate an ed25519 lab key you will never upload.

Do that twice. Then you stop translating English into commands. Your fingers just type.

Frequently asked questions

5

Do I need a separate Linux machine to learn this?

No. A terminal on Ubuntu, Fedora or Debian is enough. Windows users can use WSL. The same commands run later inside Docker and on a cloud VM.

Should I learn Vim before these 30 commands?

No. cat, less and any simple editor will do. Vim can wait until you are comfortable moving around files and reading logs.

Why do people say never use chmod 777?

It gives everyone read, write and execute. On a server that is an open door. Fix the owner and the one permission bit you actually need.

Should I use a password or a key for SSH?

Use a key. Generate one with ssh-keygen -t ed25519, then ssh-copy-id. Set a passphrase on any key you use for real work.

Will this help in campus interviews and product jobs?

Yes. Services-firm labs still ask you to find a file, chmod it and grep a log. Product teams expect SSH, ports and logs on day one.

Get tomorrow’s tech news on WhatsApp

One short update a day, free. Follow the TamilTech channel.

What do you think?

people reacted

Keerthika

TamilTech editorial team · 3,715 articles

Keerthika is an editor at TamilTech, the Tamil and English technology publication founded by Praveen Kumar S. She covers AI, smartphones, gadgets, EVs, startups and cybersecurity i...

More from Keerthika

Ask TamilTech on WhatsApp

Tech doubt? Ask in Tamil or English — our WhatsApp assistant answers from TamilTech articles in seconds.

Related stories

Comments (0)

| Supports **bold**, *italic*, `code`

Be the first to comment!

Next story SQL joins explained: INNER, LEFT, RIGHT, FULL and self join
TamilTech

TamilTech

Install app for faster access

Earn XP 🏆
WhatsApp
Notifications