Back to Blog
Arnošt Havelka

Bash Basics

Start your Bash journey with pwd and ls.

Start Interactive Lesson
Bash Basics

Welcome to Bash! The Bourne Again Shell (Bash) is your gateway to powerful command-line operations on Unix-like systems. In this lesson, you'll learn the first two essential commands every Bash user needs to know.

The Foundation: pwd and ls

When you first open a terminal, you might wonder: "Where am I?" That's where pwd comes in.

Try the command

Try it! See where you are right now.

Build the command
pwd
pwdPrint Working Directory - shows your current location in the file system.
Terminal
C:\Users\User>pwd

Real-World Examples

Find your current location:

Command Prompt
C:\Users\User>pwd

Listing Files with ls

Now that you know where you are, let's see what's around you. The ls command lists all files and directories in your current location.

Try the command

List what's in your directory!

Build the command
ls
lsList directory contents - shows files and folders in the current directory.
Terminal
C:\Users\User>ls

See your files:

Command Prompt
C:\Users\User>ls

Why These Commands Matter

Think of your file system as a building with many rooms (directories). pwd tells you which room you're in, and ls shows you what's inside that room. Together, they form the foundation of terminal navigation.


Knowledge Check

1 / 3

What does pwd stand for?

References

These documentation links provide authoritative details for the commands used in this article.

Up Next

Mastering ls Flags

Learn powerful ls flags to see more file details.