# Your First Linux Login: 6 Commands Every Future Cloud Engineer Must Know

**What if the most important file on your Linux server was invisible to a simple** `ls` **command?**

That's exactly the problem waiting for you in Chapter 1 of ChaiCode's Linux on Call lab.

Imagine this.

A company's application has just moved from a developer's laptop to a production Linux server. The previous administrator has transferred to another office. You're now responsible for the system.

The hosting provider needs the server's name.

The previous admin left a handover note.

But when your colleague checks the directory, the note appears to be missing.

No graphical interface. No file explorer. Just a terminal.

Your first responsibility isn't deploying an application or configuring Kubernetes.

It's knowing where you are, what files exist, and how to retrieve information without damaging anything.

**That's where real Linux administration begins.**

In this guide, we'll explore six foundational Linux commands, uncover hidden files, understand filesystem paths, and complete four practical tasks inspired by the ChaiCode Linux on Call lab.

**Lab:** [ChaiCode — Linux on Call, Chapter 1: Your First Login](https://labs.chaicode.com/self-paced/linux/01-first-login)

---

## 1\. Before You Touch a Server, Know Where You Are

One of the most underrated Linux habits is checking your environment before executing commands.

Why?

Because the same command can produce completely different results depending on your current directory and user permissions.

Start with:

```bash
pwd
```

Example output:

```text
/workspace/chapters/01-first-login
```

`pwd` means **Print Working Directory**.

It tells you exactly where you are inside the Linux filesystem.

Think of it like checking your location on Google Maps before following directions.

Now run:

```bash
whoami
```

Example output:

```text
student
```

This tells you which user account is executing commands.

In a real Cloud Ops environment, that distinction matters.

Running a command as an ordinary user is not the same as running it with administrator privileges.

A mistaken command executed with elevated privileges can have far greater consequences.

**Cloud Ops lesson:** Before changing anything on a server, establish your location and identity.

Two commands. A few seconds. A habit worth keeping throughout your career.

![](https://cdn.hashnode.com/uploads/covers/6366a5a0667570bca93510a5/de3e35fc-c5bc-4bc2-9a67-0b5de8bb2271.png align="center")

---

## 2\. The File You Can't See: Understanding ls and Hidden Files

Back to the missing handover note.

Your colleague runs:

```bash
ls
```

A few entries appear.

But there's no obvious handover note.

Does that mean the file doesn't exist?

Not necessarily.

By default, `ls` doesn't display filenames beginning with a period (`.`).

These are commonly called **hidden files or dotfiles**.

Linux often uses them for configuration.

But here's where things become interesting.

### A Real Example: The Hidden Files in /etc/skel

Linux includes a directory called `/etc/skel`.

This directory typically contains default configuration files used when creating new user home directories.

In the ChaiCode lab environment, it contains three important hidden files:

```text
.bash_logout
.bashrc
.profile
```

Each filename starts with a dot.

Let's see what happens when Linux lists that directory.

### Step 1: List the Directory Normally

Run:

```bash
ls /etc/skel
```

Output:

```text
(empty)
```

Nothing appears.

But the directory isn't actually empty.

It contains:

```text
.bash_logout
.bashrc
.profile
```

All three filenames begin with a dot, so a normal `ls` command skips them.

**Important lesson:** An empty listing does not necessarily mean an empty directory.

This is why administrators shouldn't assume a file is missing simply because they cannot see it.

![](https://cdn.hashnode.com/uploads/covers/6366a5a0667570bca93510a5/d4fda52d-1c84-4370-bde0-cc34e38193a8.png align="center")

### Step 2: Understand Why the Files Are Hidden

Let's examine what Linux is doing.

The directory contains:

| Actual filename | Visible with plain `ls`? |
| --- | --- |
| `.bash_logout` | No |
| `.bashrc` | No |
| `.profile` | No |

These files are not encrypted, deleted, or inaccessible simply because they're hidden.

Linux is following a naming convention.

**A filename beginning with** `.` **is excluded from ordinary** `ls` **output.**

The contents still exist.

You just need to ask the shell to show those entries.

This distinction matters when investigating application configurations, user settings, and hidden project files.

### Step 3: Reveal Everything with ls -a

Now add one option to the command:

```bash
ls -a /etc/skel
```

Output in the lab:

```text
.
..
.bash_logout
.bashrc
.profile
```

Suddenly, five entries appear.

The `-a` option means **all**.

It instructs `ls` to include hidden names.

Notice something important.

**Nothing in the directory changed. Only what you asked Linux to display changed.**

That's a useful troubleshooting principle.

Sometimes the problem isn't missing information.

It's an incomplete view of the information already available.

![](https://cdn.hashnode.com/uploads/covers/6366a5a0667570bca93510a5/10d0fa32-a33a-4e4a-b265-34158c22d811.png align="center")

### Step 4: What Do . and .. Actually Mean?

Look carefully at the first two entries:

```text
.
..
```

They're different from regular files.

They represent directory locations.

`.` **means the current directory.**

In this example:

```text
. = /etc/skel
```

`..` **means the parent directory.**

Here:

```text
.. = /etc
```

These special directory references are fundamental to Linux navigation.

For example:

```bash
ls .
```

Lists the current directory.

And:

```bash
ls ..
```

Lists the parent directory.

You can also use them in filesystem paths.

Suppose your current directory is:

```text
/etc/skel
```

Then:

```bash
cd ..
```

Moves you up to:

```text
/etc
```

The `cd` command changes your working directory. It's a useful next step in Linux navigation.

Think of it this way:

- `.` — Here.
- `..` — One level up.
- `/` — The filesystem root.

All three are useful, but they represent different locations.

![](https://cdn.hashnode.com/uploads/covers/6366a5a0667570bca93510a5/32aec1fc-471b-45d4-a776-bf478c0e5240.png align="center")

### Bonus: Get More Details with ls -la

There's another useful option:

```bash
ls -l
```

The `-l` option provides a detailed listing that includes permissions, ownership, size, and modification timestamps.

Combine both options:

```bash
ls -la /etc/skel
```

Now you can inspect hidden entries and view their metadata.

This combination is useful when diagnosing file ownership or permission-related problems.

**Cloud Ops takeaway:**

`ls` tells you what's normally visible.

`ls -a` reveals hidden entries.

`ls -la` shows hidden entries with additional details.

The difference is small.

The troubleshooting value is enormous.

![](https://cdn.hashnode.com/uploads/covers/6366a5a0667570bca93510a5/d386cbc3-c7d1-46b5-a66c-a03074332056.png align="center")

---

## 3\. Reading Files Without Opening an Editor

Once you find a file, the next challenge is reading its contents.

That's where `cat` comes in.

Consider a sample file containing Tapri's menu:

```bash
cat docs/menu.txt
```

Output:

```text
Masala chai 40
Cutting chai 25
Bun maska 50
```

Simple.

The `cat` command prints file contents directly to the terminal.

It doesn't require a graphical editor.

You can use it to inspect small configuration files, notes, and other text-based information.

But there's a catch.

Try:

```bash
cat docs
```

You'll receive an error:

```text
cat: docs: Is a directory
```

Because `docs` is a directory, not an ordinary text file.

For longer files, use:

```bash
less docs/menu.txt
```

`less` allows you to move through longer content without dumping everything onto the screen.

Press `q` to exit.

In production environments, quickly inspecting a configuration file can be the first step toward diagnosing a deployment problem.

**Cloud Ops lesson:** Learn how to inspect a file before you learn how to modify it.

![](https://cdn.hashnode.com/uploads/covers/6366a5a0667570bca93510a5/b674824a-6b97-4867-ad8d-d02249766bbe.png align="center")

---

## 4\. Relative vs Absolute Paths: A Small Difference With Big Consequences

Here's a common beginner mistake.

You run:

```bash
cat docs/menu.txt
```

It works.

Then you move to another directory and run the exact same command.

Suddenly:

```text
cat: docs/menu.txt: No such file or directory
```

What changed?

Not necessarily the file.

Your location changed.

Linux supports two important ways of identifying filesystem locations.

### Relative Paths

A relative path is interpreted using your current working directory.

Example:

```bash
cat docs/menu.txt
```

When your current directory is:

```text
/workspace/chapters/01-first-login
```

Linux looks for:

```text
/workspace/chapters/01-first-login/docs/menu.txt
```

Move somewhere else, and the relative path points somewhere else.

### Absolute Paths

An absolute path begins with `/`.

Example:

```bash
cat /workspace/chapters/01-first-login/docs/menu.txt
```

This identifies the file starting from the filesystem root.

It does not depend on your current working directory.

Here's a simple way to remember the difference:

**Relative path:** Directions from where you're standing.

**Absolute path:** The complete address from the filesystem root.

The root directory is `/`.

Don't confuse it with `/root`, which is normally the root user's home directory.

Knowing this difference becomes especially important when creating automation scripts, scheduling jobs, and troubleshooting deployments.

A script that relies on the wrong working directory can fail even when the target file exists.

![](https://cdn.hashnode.com/uploads/covers/6366a5a0667570bca93510a5/dbeb3f49-feae-4657-b425-0228cbedc204.png align="center")

---

## 5\. Writing to Files: Why One Symbol Deserves Your Attention

Reading is important.

But eventually, you need to save information.

Let's use:

```bash
echo "Masala chai"
```

Output:

```text
Masala chai
```

`echo` prints text to standard output, which normally appears in your terminal.

Now add a redirection operator:

```bash
echo "Masala chai" > special.txt
```

The text is written into `special.txt`.

Verify it:

```bash
cat special.txt
```

Output:

```text
Masala chai
```

Now comes the critical part.

Run:

```bash
echo "Ginger chai" > special.txt
```

Then:

```bash
cat special.txt
```

Output:

```text
Ginger chai
```

Where did "Masala chai" go?

It was replaced.

The `>` operator creates a file if it doesn't exist, but **overwrites an existing file's contents**.

That behavior makes it useful and potentially dangerous.

For comparison:

```bash
echo "New entry" >> special.txt
```

The `>>` operator appends to the file instead of replacing its existing contents.

Here's the distinction worth remembering:

`>` **means replace.**

`>>` **means append.**

In Cloud Ops, understanding redirection helps when writing configuration values, recording command output, and building simple shell scripts.

Be especially careful when redirecting output into production configuration files.

![](https://cdn.hashnode.com/uploads/covers/6366a5a0667570bca93510a5/f05136f3-aff2-4204-86ad-3cbd18243bd7.png align="center")

![](https://cdn.hashnode.com/uploads/covers/6366a5a0667570bca93510a5/005d3f21-0cc3-4fe8-bca7-36364ececa73.png align="center")

---

## 6\. The Real Challenge: Recover the Missing Handover Note

Now we can put the commands together.

The ChaiCode lab presents four practical tasks based on a real-world administration scenario.

You're responsible for finding the previous administrator's note, identifying the server name, and saving it correctly.

Here's how to approach each task.

### Task 1: Verify Your Location and Identity

Run:

```bash
pwd
whoami
```

This establishes your current working directory and user account.

### Task 2: Locate Arjun's Handover Note

Start by listing everything in the chapter directory:

```bash
ls -a
```

Look for entries that a normal `ls` did not show.

If the handover note appears as `NOTE.txt` in the current directory, read it with:

```bash
cat .handover/NOTE.txt
```

If you find that the note is located inside a hidden directory, use its actual path instead:

```bash
cat .hidden-directory/NOTE.txt
```

Replace `.hidden-directory` with the real directory name found during your investigation.

The important principle is to inspect hidden entries instead of assuming the handover note is missing.

![](https://cdn.hashnode.com/uploads/covers/6366a5a0667570bca93510a5/a58125cf-adda-4991-8264-1aa016a78636.png align="center")

### Task 3: Save the Server Name

Read Arjun's note carefully.

Find the exact server name specified in its contents.

Then create `answer.txt` in the chapter directory:

```bash
echo "SERVER_NAME_FROM_NOTE" > answer.txt
chai-server-01
echo "chai-server-01" > answer.txt
```

Replace `SERVER_NAME_FROM_NOTE` with the exact server name shown in the note. This is a placeholder, not the lab's actual answer.

Verify your work:

```bash
cat answer.txt
```

The file must contain the required server name, without extra explanatory text.

![](https://cdn.hashnode.com/uploads/covers/6366a5a0667570bca93510a5/9c1693e5-b465-4661-b614-74178bddcf47.png align="center")

### Task 4: Answer the Linux Path Interview Question

The task asks:

**What does a path starting with** `/` **mean?**

An appropriate answer is:

"A path beginning with `/` is an absolute path. It starts from the Linux filesystem's root directory, `/`, rather than from the current working directory."

Save your answer:

```bash
echo "A path starting with / is an absolute path, resolved from the filesystem root directory /." > paths.txt
```

Verify:

```bash
cat paths.txt
```

You have now practiced checking your identity, navigating directories, discovering hidden entries, reading files, writing files, and understanding absolute paths.

These aren't isolated commands.

They're the building blocks of real administration workflows.

![](https://cdn.hashnode.com/uploads/covers/6366a5a0667570bca93510a5/d8283c68-00a3-4a5f-a450-eb2914ecd60b.png align="center")

---

## 7\. What This Lab Teaches Beyond Linux Commands

The most important takeaway isn't memorizing six commands.

It's learning a reliable way to approach unfamiliar systems.

Consider how the problem unfolds.

First, you identify your working environment.

Then, you inspect what's available.

When the expected file isn't visible, you investigate rather than assume.

After locating the file, you read it.

Only then do you write the requested information to a new file.

Finally, you verify the result.

That's a simplified version of a workflow used throughout infrastructure operations:

**Observe → Investigate → Understand → Change → Verify**

Notice what's missing?

Guesswork.

Good operational practice reduces assumptions and favors small, verifiable actions.

This applies to far more than introductory Linux labs.

When a configuration file seems missing, inspect the correct directory and hidden entries.

When a script can't find a file, verify its working directory and paths.

When saving output, check whether redirection will overwrite something important.

When troubleshooting access, verify which user is executing the command.

**Reliable infrastructure operations begin with reliable habits.**

![](https://cdn.hashnode.com/uploads/covers/6366a5a0667570bca93510a5/c563f1df-e967-4350-9719-a43c1fbca90a.png align="center")

---

## 8\. Linux Interview Questions You Can Answer After Chapter 1

### What does pwd do?

It prints the absolute path of the current working directory.

### What's the difference between whoami and pwd?

`whoami` identifies the current user. `pwd` identifies the current working directory.

### Why doesn't ls display every file?

By default, `ls` hides names beginning with a period. Use `ls -a` to show them.

### What does a single dot mean in Linux?

`.` refers to the current directory.

### What do two dots mean in Linux?

`..` refers to the parent directory.

### What is /etc/skel used for?

It commonly holds default files that are copied into newly created user home directories, depending on the user-creation tools and configuration.

### What does cat do?

It reads files and writes their contents to standard output.

### What's the difference between relative and absolute paths?

Relative paths are interpreted from the current working directory. Absolute paths start from the filesystem root directory `/`.

### What's the difference between > and >>?

`>` overwrites the destination file. `>>` appends data to it.

These questions may look basic, but the concepts support shell scripting, server administration, incident troubleshooting, and cloud infrastructure work.

---

## 9\. Your First Linux Lab Is Only the Beginning

There's a temptation to skip beginner commands and move straight into Docker, Kubernetes, Terraform, or cloud certifications.

But advanced tools don't eliminate the need for Linux fundamentals.

Containers still have filesystems.

Automation still depends on commands and paths.

Servers still have user accounts, permissions, and configuration files.

And troubleshooting still begins with understanding the environment in front of you.

That's why a practical first-login lab is valuable.

It shifts learning away from memorizing command definitions and toward solving a specific operational problem.

You're not simply practicing `ls -a`.

You're locating a handover note that another administrator couldn't find.

You're not simply practicing `echo`.

You're recording information needed for an infrastructure support workflow.

You're not simply memorizing absolute paths.

You're learning why the same command can succeed in one directory and fail in another.

**Learn the command. Understand the behavior. Apply it to a real problem. Verify the result.**

That's how beginner knowledge becomes operational skill.

---

## Final Takeaway

Six commands form the foundation of this first Linux challenge:

- `pwd` — Find where you are.
- `whoami` — Identify who you are.
- `ls` — List directory contents.
- `ls -a` — Reveal hidden entries.
- `cat` — Read file contents.
- `echo` — Print or write text using shell redirection.

Also remember:

`.` **\= Current directory**

`..` **\= Parent directory**

`/` **\= Filesystem root**

The commands are simple.

The operational habits behind them are what matter.

If you're learning Linux, Cloud Ops, DevOps, or technical support, start by understanding your environment before trying to control it.

**A good engineer doesn't need to know everything about a server. They need to know how to find the truth, make a safe change, and verify what happened.**

### Try the Lab Yourself

**Lab:** [Chapter 1 — Your First Login](https://labs.chaicode.com/self-paced/linux/01-first-login)

**Learning track:** [Linux on Call](https://labs.chaicode.com/self-paced/linux)

**Platform:** [ChaiCode Labs](https://labs.chaicode.com/labs)

**Open to Cloud Ops Remote and technical writing projects.**
