> ## Documentation Index
> Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Course Introduction

> Practical Linux system administration course teaching command line usage, file permissions, troubleshooting, and hands on labs with ephemeral infrastructure for safe practice.

Author: Jeremy Morgan

In this lesson you'll learn essential principles for managing Linux systems effectively. This course focuses on practical Linux system administration: using the command line, understanding file permissions, and applying hands-on troubleshooting. Each lesson includes interactive, browser-based exercises and just-in-time infrastructure so you can practice real operational tasks in a safe environment.

## Why Linux?

Linux is a popular choice for servers, development platforms, and embedded systems because of its stability, security, and flexibility. Key attractions include:

* Powerful command-line utilities and scripting capabilities
* Mature package management and service control systems
* A large ecosystem of open-source tools for automation, monitoring, and security

## Learning approach

This course emphasizes active learning:

* Interactive labs simulate real-world scenarios.
* You’ll receive ephemeral infrastructure for safe experimentation.
* Exercises are designed to reinforce concepts immediately after they are introduced.

## Practical example: finding executable files and saving results

Here’s a common lab task: locate executable files under a path and save the results to a file.

```bash theme={null}
bob@caleston-lp10:~$ sudo find /opt/findme/ -type f -perm u=x | sudo tee /opt/foundthem.txt
```

What this does:

* `find /opt/findme/` searches the directory tree rooted at `/opt/findme/`.
* `-type f` restricts results to regular files.
* `-perm u=x` with GNU find can behave as an exact-match specification (it matches files whose permission bits equal that pattern). If you want to match files that have the owner execute bit set regardless of other permission bits, use `-perm -u=x` instead.
* `| sudo tee /opt/foundthem.txt` writes the output to `/opt/foundthem.txt` while also echoing it to the terminal. `sudo` before `tee` ensures the file is written with appropriate privileges when `/opt` is not writable by your user.

Examples — recommended variation to match files where the owner execute bit is set:

```bash theme={null}
sudo find /opt/findme/ -type f -perm -u=x | sudo tee /opt/foundthem.txt
```

### Quick reference table: common find flags used in labs

| Option | Purpose | Example |
| - | - | - |
| `-type f` | Match regular files | `find /path -type f` |
| `-type d` | Match directories | `find /path -type d` |
| `-perm -u=x` | Match files with owner execute bit set (regardless of other bits) | `find /opt/findme -perm -u=x` |
| `-perm u=x` | Exact permission match (may behave differently across find implementations) | `find /opt/findme -perm u=x` |
| `-name '*.sh'` | Match by filename pattern | `find /path -type f -name '*.sh'` |
| `-mtime -7` | Modified within last 7 days | `find /path -mtime -7` |

## Why use `tee` and `sudo` together?

* `tee` receives stdin and writes to both stdout and the specified file.
* Placing `sudo` in front of the `find` command elevates the find process; placing `sudo` in front of `tee` elevates the file write. If you omit `sudo` before `tee`, the pipeline may fail to write to protected locations even if `find` runs as root.

## Best practices and tips

* Prefer `-perm -u=x` when you want to match files that have the owner execute bit set — it avoids surprises from exact-match semantics.
* Use `sudo` only when necessary and understand which part of a pipeline requires elevated privileges.
* Test commands in a small directory first before running them against large or important filesystems.

<Callout icon="lightbulb" color="#1CB2FE">
  When running commands that read or write system paths, you may need `sudo` to access protected directories or to write to locations outside your home directory. In interactive lab environments, be mindful that files and changes may be ephemeral and reset between sessions.
</Callout>

## Links and references

* [GNU findutils manual](https://www.gnu.org/software/findutils/)
* [find(1) — Linux man page](https://man7.org/linux/man-pages/man1/find.1.html)
* [sudo(8) — Linux man page](https://man7.org/linux/man-pages/man8/sudo.8.html)
* [tee(1) — Linux man page](https://man7.org/linux/man-pages/man1/tee.1.html)

You can practice these commands and complete the hands-on exercises included with this lesson to build confidence in real operational tasks.

<CardGroup>
  <Card title="Watch Video" icon="video" cta="Learn more" href="https://learn.kodekloud.com/user/courses/crash-course-linux-for-absolute-beginners/module/ad9775dd-41c2-4d59-ae9a-6b18672ecbac/lesson/c886de0a-867b-4e7c-a4b6-5e6f82726b97" />
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.