5 Linux Commands Every Beginner Should Know
Learn how to find your location, list files, move between folders, create a directory, and read a text file in Linux.
Learning Linux starts with understanding where you are and how to explore your files. These five commands give you a practical starting point.
You’ll need a Linux terminal. You can use a Linux computer, a virtual machine, or Ubuntu through Windows Subsystem for Linux.
1. Find your current folder with pwd
Run:
pwdThe command prints your current directory’s full path. For example:
/home/nellyYour result will depend on your username and current location.
2. List files with ls
Run:
lsThis lists the visible files and folders in your current directory.
For more details, including permissions, use:
ls -lTo include hidden entries, use:
ls -aHidden filenames usually begin with a dot.
3. Create a folder with mkdir
Create a practice folder:
mkdir reconhack-practiceRun ls again to confirm that it appears. If that name already exists, choose another name.
4. Move between folders with cd
Enter your practice folder:
cd reconhack-practiceRun pwd to check your new location.
Move back to the parent folder with:
cd ..5. Read a text file with cat
First, return to your practice folder:
cd reconhack-practiceCreate a small text file using this command. It creates hello.txt, or replaces its contents if the file already exists:
printf 'Hello from ReconHack Labs!\n' > hello.txtRead the file:
cat hello.txtYou should see:
Hello from ReconHack Labs!Use cat for small text files. Large files are easier to explore with a pager such as less.
Try it yourself
Create another folder inside your practice directory. Enter it, check your location, then return to the parent directory and list its contents.
The goal is to understand how each command changes—or shows—your working environment.
Further reading
Find command documentation in the GNU Coreutils manual and the Bash manual.