This content originally appeared on DEV Community and was authored by kevmongare
As a Junior Dev or Engineer, one of the first things that can feel super overwhelming is the terminal jargon. Engineers throw commands around like magic spells, and sometimes no one explains what they actually do.
That was me a few years agoβjust a mix of eagerness, frustration, and curiosity, desperately trying to figure it all out.
By the end of this article, youβll be able to write your first 5β10 terminal commands without asking ChatGPT . Letβs make your βevil relativesβ who doubted you think youβre a computer wizard
.
Ready? Letβs dive in!I promise this should be short and sweet .
This are the Terminal Commands Every Beginner Dev Should Know (and Actually Use!)
- ls β List Files and Folders
ls is short for βlist,β and thatβs exactly what it does. Your computer is made of files and folders, and ls lets you see whatβs in your current directory.
ls # list files and folders
ls -l # detailed list
ls -a # include hidden files
- cd β Change Directory
Ever feel lost in your folders? cd (change directory) is your teleportation spell. Move between folders like a boss.
cd /home/user # go to /home/user
cd .. # go up one folder
cd ~ # go to your home directory
- pwd β Print Working Directory
When in doubt, just ask yourself: βWhere am I?β Thatβs what pwd does. It prints the full path of your current folder.
pwd
# /home/user/projects
- mkdir β Make a Directory
Want to create a new folder? mkdir is your magic wand. Name it anything you like and organize your files neatly.
mkdir my_first_project
- touch β Create a File
Need a blank file to start coding or taking notes? touch has you covered.
touch hello_world.py
Now youβve got a file ready for action.
- rm β Remove Files or Folders
Every wizard needs the power to delete things . rm removes files, and with -r it deletes folders recursively (be careful, no undo!).
rm old_file.txt
rm -r old_folder
- cp β Copy Files or Folders
Copying is caring. cp lets you make duplicates without moving the original.
cp hello_world.py backup_hello.py
cp -r my_first_project my_first_project_backup
- mv β Move or Rename
mv is the teleportation + renaming spell. Move files around or just rename them.
mv hello_world.py code.py # rename
mv code.py ~/projects/ # move to another folder
- cat β View File Contents
Want to peek inside a file without opening a full editor? cat shows everything in one go.
cat hello_world.py
Itβs like unwrapping a presentβinstant gratification.
- ssh β Connect to Another Server
The ultimate hacker move βssh lets you securely log in to another server and work remotely.
ssh user@hostname
Imagine controlling another computer from your terminal. Feels like magic, right?
Final Words
Congratulations!
If you practice these 10 commands daily, youβll quickly go from terminal newbie to someone who navigates folders, creates projects, edits files, and connects to servers like a pro.
Soon enough, your βevil relativesβ will look at you and ask you to hack the banks and save them from poverty.
on a lighter note.
Pro tip: Donβt just readβopen your terminal and try each command. Practice is how magic becomes muscle memory.
All the best
This content originally appeared on DEV Community and was authored by kevmongare