# Commands

### The Usual Suspects

#### `man` - what does the \_\_\_\_ command do?

The `man` command allows the user to view the manual of any command that has one. Try it out with `man man`, you'll see a list of uppercase informative sections including NAME DESCRIPTION and OPTIONS.&#x20;

#### `cd` - how do i get around?

The change directory command lets you move between directories.

#### `ls` - show me everything in this directory

#### `pwd` - where am i?

#### `mv` - let's move this file

#### `rm` - i would like to destroy this file or directory

#### `alias` - i want to make my own cool linux commands

### The IO Stuff

#### `cat` - print all the things!

#### `less` - i want to look at a file in my terminal without using a text editor

#### `head` - only show me the top part

#### `tail` - only show me the bottom part

Prints out the last 10 lines of the input by default.

* `-n` specify the number of lines to output
* `-f` prevents `tail` from closing and waits for additional output; useful for printing out a file as it is appended to

### The Super Powerful Ones That Don't Make Sense

#### `sed` - i want to edit a stream of text


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.theprogrammershandbook.com/nix/commands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
