# Basic Linux Commands

We will explore fundamental commands such as `whoami`, `hostname`, `ls`, `cd`, etc which are crucial for everyday Linux usage.

## Whoami

```bash
┌──(kali㉿kali)-[~/Downloads]
└─$ whoami
kali
```

`whoami` command is used to display the current logged-in user's username on the terminal. &#x20;

## Print Working Directory

```bash
┌──(kali㉿kali)-[~/Downloads]
└─$ pwd
/home/kali/Downloads
```

The `pwd` (print working directory) command in Linux is used to display the *absolute path of the current working directory* (folder).

If you modify files directly in `/home/kali/Downloads`, the changes will immediately take effect because you're working in that directory.

## Echo

```bash
┌──(kali㉿kali)-[~/Downloads]
└─$ echo "Hello NCA@Nepal" 
Hello NCA@Nepal
```

The `echo` command in Linux is used to display messages, text, or variable values in the terminal. It is commonly used in shell scripts and command-line operations for outputting information.

Instead of displaying the text on the terminal, we can save it to a file using the redirection operator `>`.

```bash
┌──(kali㉿kali)-[~/Downloads]
└─$ echo "Hello NCA@Nepal" > hello.txt
```

* `echo "Hello NCA@Nepal"` → Prints "Hello NCA\@Nepal" to standard output.
* `>` → Redirects the output to a file (overwrites if the file already exists).
* `hello.txt` → The file where the output is saved.

If this command is executed in `/home/kali/Downloads`, it will create (or *overwrite*) the file `hello.txt` in that directory. This is a useful technique for writing text to files directly from the command line.

## Ls Command

We have successfully created a `hello.txt`, now let's see what files exist in the current directory. To do so, we will use the `ls` command as `ls` command is used for listing files and directories in the current working directory. It helps you see what files and folders exist in a specific location.

```bash
┌──(kali㉿kali)-[~/Downloads]
└─$ ls
hello.txt
```

## Cat Command

Now, in order to view the "Hello NCA\@Nepal" inside `hello.txt` which we created through ‘`echo`' command we will use the cat command to display its content as `cat` command is used to display the contents of a file on the terminal. It's short for "*concatenate*" and can also be used to combine multiple files into one.

```bash
┌──(kali㉿kali)-[~/Downloads]
└─$ cat hello.txt
Hello NCA@Nepal
```

## Create a File (GUI)

Instead of creating a file through the CLI, let's now create a file through the GUI in the `/home/kali/Downloads` directory. Just right-click and “Create New Empty File” and we named it as `hello1.txt`

<figure><img src="/files/WRbWEvWYn9SopwBemMTV" alt=""><figcaption></figcaption></figure>

Let's write some content into the `hello1.txt` file. We can either open it using a text editor. By default, Kali Linux uses `Mousepad` as the default text editor to open the file.

<figure><img src="/files/dNpaPYyg4OG95PGLpvX5" alt=""><figcaption></figcaption></figure>

We will now view the `hello1.txt` file through the Linux terminal, as we learned the command previously. First, let's check how many files are currently present in the current working directory:

```bash
┌──(kali㉿kali)-[~/Downloads]
└─$ ls
hello1.txt  hello.txt
```

Let's view the content of `hello1.txt` using the `cat` command, which we learned previously.

```bash
┌──(kali㉿kali)-[~/Downloads]
└─$ cat hello1.txt
welcome to the NCA@Nepal mentorship program!!!!
```

## Navigating the Linux Filesystem

To navigate from one directory to another, the cd (change directory) command is used. It allows users to move between directories efficiently using **absolute or relative paths**.

### Absolute Path

An absolute path is a full path that starts from the root directory (`/`) and specifies the complete location of a file or folder in the system. It always gives the exact location, no matter where you are in the filesystem. For example, if you want to navigate to the Destkop folder from anywhere, you would use the absolute path:

```bash
┌──(kali㉿kali)-[/usr/share/wordlists]
└─$ pwd
/usr/share/wordlists
                                                                
┌──(kali㉿kali)-[/usr/share/wordlists]
└─$ cd /home/kali/Desktop
                                                                
┌──(kali㉿kali)-[~/Desktop]
└─$ 
```

This path starts from the root (`/`) and gives the complete route to the target directory. Absolute paths are useful when you need to always reference the same location, no matter your current directory.

### Relative path

A relative path is a path that describes the location of a file or folder in relation to your current directory. It doesn’t start from the root but from where you are currently located in the filesystem. For example, if you're in `/home/kali/Downloads` and want to go to the `Destkop` folder, you could use the command:

```bash
┌──(kali㉿kali)-[~/Downloads]
└─$ pwd            
/home/kali/Downloads
                                                                
┌──(kali㉿kali)-[~/Downloads]
└─$ cd ../Desktop           
                                                                
┌──(kali㉿kali)-[~/Desktop]
└─$ 
```

Here, `..` means "go up one directory level" (from `Downloads` to `kali`), and then you move into `Destkop`. Relative paths are shorter and more flexible when you're working within a specific folder structure.

**Key difference:** Absolute paths are fixed and start from the root directory, ensuring that the location is always the same. Relative paths depend on your current location and are easier to use for quick navigation within a known directory structure.

In summary, use **absolute paths** for precise navigation when you need the exact location, and **relative paths** for faster, simpler navigation within a known directory structure.

## Changing Directories with `cd`&#x20;

The `cd` command is primarily used to move around the filesystem so you can access, manage, or modify files in different directories. Since many terminal-based operations depend on your current location in the filesystem, `cd` helps ensure you're working in the correct directory.

Assume you are presently situated in the **Desktop** directory, located at `/home/kali/Desktop`, and your objective is to navigate to the **Downloads** directory, found at `/home/kali/Downloads`. Below is a detailed, step-by-step guide on how to accomplish this using the `cd` command:

### Ascend to the Parent Directory

Given that both the `Desktop` and `Downloads` directories reside within the `/home/kali` path, the most efficient way to proceed is by navigating to the parent directory. This can be accomplished using `cd ..`:

```bash
┌──(kali㉿kali)-[~/Desktop]
└─$ pwd    
/home/kali/Desktop
                                            
┌──(kali㉿kali)-[~/Desktop]
└─$ cd ..        
                                            
┌──(kali㉿kali)-[~]
└─$ ls
Desktop    Downloads  Pictures  Templates
Documents  Music      Public    Videos
                                            
┌──(kali㉿kali)-[~]
└─$ cd Downloads
                                            
┌──(kali㉿kali)-[~/Downloads]
└─$ 
```

`cd ..` : This command elevates you one level up in the directory hierarchy, repositioning you within `/home/kali`.

You would use `..` to move up one level. You would use `../..` to move up two levels. You would use `../../..` to move up three levels, and so on.

{% hint style="info" %}
**Note**: In Linux, `.` refers to the current directory, allowing you to execute commands or access files in the directory you're in. On the other hand, `..` refers to the parent directory, enabling you to move up one level in the directory hierarchy.
{% endhint %}

## Getting Help

When you are stuck with a command—unsure about its **syntax** (the correct structure of the command) or the **switches** (options and flags that modify the command’s behavior)—the `help` command in Linux becomes a valuable tool.

It provides detailed information about built-in shell commands, explaining how to use them correctly. This includes:

* **Command syntax:** The proper format for running the command.
* **Switches and options:** A list of available flags that customize the command’s output or behavior.
* **Brief descriptions:** Explanations of what each option does and when to use it.
* **Examples:** Some help outputs offer example usages for better understanding.

```bash
┌──(kali㉿kali)-[~/Desktop]
└─$ ls --help
Usage: ls [OPTION]... [FILE]...
List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.

Mandatory arguments to long options are mandatory for short options too.
  -a, --all                  do not ignore entries starting with .
  -A, --almost-all           do not list implied . and ..
      --author               with -l, print the author of each file
  -b, --escape               print C-style escapes for nongraphic characters
```

You receive a detailed list of switches (also called options or flags) that can be used to modify the behavior of the `ls` command.

## Hidden Files

For instance, consider a hidden file named `.hidden_file`. The standard `ls` command will not display this file, as *hidden files (those beginning with a dot `.`)* are excluded by default. To reveal such hidden files, you need to use the `-a` switch with the `ls` command, which lists all entries, including hidden ones.

```bash
┌──(kali㉿kali)-[~/Desktop]
└─$ ls
                                                                                                
┌──(kali㉿kali)-[~/Desktop]
└─$ ls -a    
.  ..  .hidden_file
                                                                                                
┌──(kali㉿kali)-[~/Desktop]
└─$ ls -la
total 8
drwxr-xr-x  2 kali kali 4096 Feb 23 06:54 .
drwx------ 15 kali kali 4096 Feb 23 06:36 ..
-rw-rw-r--  1 kali kali    0 Feb 23 06:54 .hidden_file
```

You can also combine switches, as in `ls -la`. In this case, the `-a` switch will reveal hidden files, while the `-l` switch presents the output in a detailed long-listing format, displaying additional information such as file permissions, ownership, size, and modification date.

## Referencing Manual Pages with `man`&#x20;

In Linux, both `man` and `help` commands provide information about how to use various commands, but they serve different purposes. The `help` command is specifically designed for built-in shell commands, such as `cd`, `exit`, or `echo`. It offers a brief overview of the command’s syntax and available options, making it useful for quick references when working with basic shell commands. However, it doesn’t cover external commands or software installed on the system.

On the other hand, the `man` command (short for "manual") provides comprehensive documentation for nearly all commands, including both built-in and external ones like `ls`, `grep`, or `ping`. Unlike `help`, `man` offers detailed information structured into sections such as NAME, SYNOPSIS, DESCRIPTION, and EXAMPLES. This makes it particularly useful for understanding complex commands or exploring advanced features. Additionally, `man` pages allow users to navigate and search within the documentation, making it easier to find specific information.

```bash
┌──(kali㉿kali)-[~/Desktop]
└─$ man <command_name>
┌──(kali㉿kali)-[~/Desktop]
└─$ man ls   
LS(1)                                                 User Commands                                                 LS(1)

NAME
       ls - list directory contents

SYNOPSIS
       ls [OPTION]... [FILE]...

DESCRIPTION
       List  information about the FILEs (the current directory by default).  Sort entries alphabetically if none of -cf‐
       tuvSUX nor --sort is specified.

       Mandatory arguments to long options are mandatory for short options too.

       -a, --all
              do not ignore entries starting with .

       -A, --almost-all
              do not list implied . and ..

       --author
              with -l, print the author of each file

       -b, --escape
              print C-style escapes for nongraphic characters

       --block-size=SIZE
              with -l, scale sizes by SIZE when printing them; e.g., '--block-size=M'; see SIZE format below

       -B, --ignore-backups
 Manual page ls(1) line 1 (press h for help or q to quit)
//..SNIP..//
```

In general, `help` is ideal for quick, straightforward guidance on built-in shell commands, while `man` is better suited for in-depth documentation on both system commands and external programs. Advanced users often rely on `man` when they need a deeper understanding of a command’s functionality, options, and usage examples.

## Finding Stuff

In Linux, the process of "finding stuff" generally refers to searching for files, directories, or content within files. There are several tools and commands that can help you do this efficiently. Here are some common methods:

### `find` Command

The `find` command is a powerful tool for searching files and directories based on specific conditions, such as name, type, size, or modification time.

#### Example:

To find all files named `test.txt` starting from the `/home/kali/Destkop` directory:

```bash
┌──(kali㉿kali)-[~/Desktop]
└─$ find /home/kali/Desktop 'test.txt'
/home/kali/Desktop
/home/kali/Desktop/.hiden_file
/home/kali/Desktop/test.txt
test.txt
```

### **`locate` Command**

The `locate` command quickly finds files by searching a pre-built database of file names. It's faster than `find` because it doesn't search the filesystem directly, but the database needs to be updated with the `updatedb` command.

#### Example:

To locate a file named `test.txt`

```jsx
┌──(kali㉿kali)-[~/Desktop]
└─$ locate test.txt
/home/kali/Desktop/test.txt
/usr/lib/llvm-16/build/utils/lit/tests/Inputs/config-map-discovery/invalid-test.txt
/usr/lib/llvm-16/build/utils/lit/tests/Inputs/lit-opts/test.txt
/usr/lib/llvm-16/build/utils/lit/tests/Inputs/reorder/new-test.txt
```

### **`grep` Command**

The `grep` command in Linux is one of the most useful and powerful tools for searching through files to find a specific string or pattern. It stands for "Global Regular Expression Print" and works by searching through the contents of files to match the pattern you specify.

```jsx

┌──(kali㉿kali)-[~/Desktop]
└─$ grep [options] pattern [file...]  

```

#### Commonly Used Options:

1. **`i`**: Ignore case (case-insensitive search)
   * **Example**: This will find both "apache" and "Apache" in the file.

     ```bash
     ┌──(kali㉿kali)-[/var/log/apache2]
     └─$ grep -i "apache" /var/log/apache2/error.log

     [Sun Feb 23 08:37:52.084404 2025] [mpm_prefork:notice] [pid 59931:tid 59931] AH00163: Apache/2.4.62 (Debian) configured -- resuming normal operations
     [Sun Feb 23 08:37:52.084447 2025] [core:notice] [pid 59931:tid 59931] AH00094: Command line: '/usr/sbin/apache2'

     ```

### Finding Binaries

In Linux, a **binary** refers to an executable file, typically compiled from source code. Binaries are machine-readable files that the operating system can directly execute. Common examples include commands like `ls`, `grep`, `python`, or custom programs.

Binaries are usually stored in directories like:

1. **`/bin`**: Essential command binaries for all users (e.g., `ls`, `cp`).
2. **`/usr/bin`**: Non-essential command binaries for all users (e.g., `python`, `vim`).
3. **`/usr/local/bin`**: Binaries for programs installed locally by the system administrator.
4. **`/sbin`**: Essential system binaries for system administration (e.g., `fdisk`, `iptables`).
5. **`/usr/sbin`**: Non-essential system binaries for system administration.

#### Finding Binaries with `whereis`

The `whereis` command in Linux is used to locate the **binary**, **source**, and **manual page** files for a given command. It is particularly useful for finding the location of executables (binaries).

```jsx
┌──(kali㉿kali)-[/var/log/apache2]
└─$ whereis [options] <command_name>

┌──(kali㉿kali)-[/var/log/apache2]
└─$ whereis ls                      
ls: /usr/bin/ls /usr/share/man/man1/ls.1.gz
```

The output of the `whereis ls` command provides the locations of the **binary**, **source code** (if available), and **manual pages** for the `ls` command. Here's the breakdown of the output:

#### Explanation:

1. **`/usr/bin/ls`**:
   * This is the **binary** (executable) file for the `ls` command. It is the program that runs when you type `ls` in the terminal.
2. **`/usr/share/man/man1/ls.1.gz`**:
   * This is the **manual page** (documentation) for the `ls` command. It is a compressed file containing the help and usage information for `ls`. You can view it using the `man ls` command.

#### What It Means:

* The `whereis` command is telling you:
  * The `ls` binary is located at `/usr/bin/ls`.
  * The manual page for `ls` is located at `/usr/share/man/man1/ls.1.gz`.

If there were source code files for `ls`, they would also be listed here, but in this case, no source code is found.

### Finding Binaries in the PATH with `which`&#x20;

The `which` command is a simple yet powerful tool in Linux and Unix-like systems. It helps you locate the exact path of an executable binary that is available in one of the directories listed in your PATH environment variable. This is particularly useful for understanding which version of a command or program is being executed when you type it in the terminal.

```bash
┌──(kali㉿kali)-[/var/log/apache2]
└─$ which python
/usr/bin/python
```

**EXPLANTION** :

1. **`/usr/bin/python`**:
   * This is the **full path** to the `python` binary that is being executed when you type `python` in the terminal.
   * It tells you exactly where the `python` program is located on your system.
2. **`/usr/bin`**:
   * This is one of the standard directories in Linux where **system-wide binaries** are stored.
   * It contains executable files for commands and programs that are available to all users on the system.
3. **`python`**:
   * This is the name of the binary (executable file) for the Python interpreter.

## About Files

### Creating file with `cat`&#x20;

The `cat` command in Linux is a versatile tool that can be used to create files interactively. To create a file using `cat`, you start by opening the terminal and typing the command `cat > filename`, where `filename` is the name of the file you want to create. Once you press Enter, the terminal will allow you to type the content you want to add to the file. You can enter multiple lines of text, and when you are done, you press `Ctrl + D` to save the file and exit. For example, if you run `cat > myfile.txt` and type "Hello, this is my first file created using cat," followed by pressing `Ctrl + D`, a file named `myfile.txt` will be created with the content you entered.

```bash
┌──(kali㉿kali)-[~/Desktop]
└─$ cat > myfile.txt
Hello, this is my first file created using cat.

┌──(kali㉿kali)-[~/Desktop]
└─$ cat myfile.txt   
Hello, this is my first file created using cat.
```

Additionally, the `cat` command can be used to append content to an existing file without overwriting it. To do this, you use the `>>` operator instead of `>`. For instance, running `cat >> myfile.txt` allows you to add more lines to `myfile.txt`. After typing the new content and pressing `Ctrl + D`, the new text will be added to the end of the file. This makes `cat` a convenient tool for both creating and modifying files directly from the terminal.

### File Creation with `touch`&#x20;

The `touch` command in Linux is a versatile utility primarily designed to **update the timestamps** of a file, such as its **last access time** and **last modification time**. However, it also has a secondary and highly useful feature: if the specified file does not already exist, `touch` will **create an empty file** by default. This dual functionality makes `touch` a convenient tool for both file management and file creation.

```bash
┌──(kali㉿kali)-[~/Desktop]
└─$ touch newfile    
                                                                                                                          
┌──(kali㉿kali)-[~/Desktop]
└─$ cat newfile
                                                                                                                          
┌──(kali㉿kali)-[~/Desktop]
└─$ 
```

* The `cat` command did not print anything because the file `newfile` was empty.
* The `touch` command creates an empty file by default.
* To display content with `cat`, you need to add data to the file using tools like `echo`, `cat >>`, or a text editor.

### Creating files with text editors

Creating files using text editors in Linux is a common task, and there are several text editors available for this purpose. Two of the most widely used text editors are **Nano** and **Vim**. We will see with nano for now:

### Nano

Nano is a simple, beginner-friendly text editor that is easy to use. It provides an intuitive interface with on-screen instructions for common tasks.

```bash
┌──(kali㉿kali)-[~/Desktop]
└─$ nano newfile 

```

Once inside Nano, you can start typing or editing text directly. The interface displays helpful shortcuts at the bottom of the screen, such as:

* `^O` (<kbd>Ctrl + O</kbd>): Save the file.
* `^X` (<kbd>Ctrl + X</kbd>): Exit Nano.
* `^G` (<kbd>Ctrl + G</kbd>): Open the help menu.

**Save the File:**

* To save the file, press <kbd>Ctrl + O</kbd>. Nano will prompt you to confirm the filename. Press <kbd>Enter</kbd> to save.

**Exit Nano:**

* To exit Nano, press <kbd>Ctrl + X</kbd>. If you have unsaved changes, Nano will ask if you want to save them before exiting.

I generally just do, `nano filename` then *write my content there*, and use <kbd>CTRL + S</kbd>  to save and <kbd>CTRL + X</kbd> to exit.

## Creating a Directory (or `folder`?)

The command for creating a directory in Linux is **`mkdir`**, which stands for **"make directory"**. This command is used to create one or more directories in the specified location. To create a directory named **`newdirectory`**, you would enter the following command:

```bash

┌──(kali㉿kali)-[~/Desktop]
└─$ mkdir newfolder
                                                                                                                          
┌──(kali㉿kali)-[~/Desktop]
└─$ cd  newfolder
                                                                                                                          
┌──(kali㉿kali)-[~/Desktop/newfolder]
└─$ 

```

To create **multiple folders** (directories) in Linux, you can use the `mkdir` command followed by the names of the directories you wish to create, separated by spaces. For example, to create three folders named `newfolder1`, `newfolder2`, and `newfolder3`, you would use the following command:

```bash
┌──(kali㉿kali)-[~/Desktop/newfolder]
└─$ mkdir newfolder1 newfolder2 newfolder3
                                                                                                                          
┌──(kali㉿kali)-[~/Desktop/newfolder]
└─$ ls
newfolder1  newfolder2  newfolder3

```

### Copying Files and Folders

#### Copying a File

To copy files in Linux, the **`cp`** command is used. This command creates a duplicate of the file in the specified destination while preserving the original file in its original location. Below is an explanation of how to use the `cp` command, along with an example scenario where we create a file named `oldfile` in the root directory using the `touch` command, copy it to `/home/kali/Desktop/newfolder`, and rename it during the process, all while leaving the original `oldfile` intact.

Basic Syntax:

```bash
┌──(kali㉿kali)-[~/Desktop/newfolder]
└─$ cp <source> <destination> 
```

```bash
┌──(kali㉿kali)-[~/Desktop/newfolder]
└─$ sudo touch /oldfile        
[sudo] password for kali: 

┌──(kali㉿kali)-[~/Desktop/newfolder]
└─$ cp /oldfile /home/kali/Desktop/newfolder/newfile 
                                                                                                                          
┌──(kali㉿kali)-[~/Desktop/newfolder]
└─$ ls
newfile  newfolder1  newfolder2  newfolder3
```

#### Copying a Folder

```jsx
┌──(kali㉿kali)-[~/Desktop]
└─$ sudo mkdir /nca            
[sudo] password for kali: 

┌──(kali㉿kali)-[~/Desktop]
└─$ cp -r /nca /home/kali/Desktop/nca

```

#### **`cp -r /nca /home/kali/Desktop/nca`**

* **`cp`**: This command is used to copy files or directories.
* **`r`**: This option tells the `cp` command to copy directories recursively, meaning it will copy the directory and all its contents (files and subdirectories).
* **`/nca`**: This is the source directory being copied.
* **`/home/kali/Desktop/nca`**: This is the destination path where the directory will be copied. In this case, it will copy the `nca` directory to the `Desktop` folder of the `kali` user.

This command copies the entire `nca` directory (located in the root `/`) to the `Desktop` folder of the `kali` user.

### Renaming Files and Folder

In Linux, unlike some other operating systems such as Windows, there is no dedicated command exclusively for renaming files or directories. However, Linux provides a versatile command called `mv` (short for "move"), which serves a dual purpose. Not only can it relocate files or directories to a different location within the filesystem, but it can also be used to rename them. This flexibility makes the `mv` command an essential tool for file and directory management.

When you use the `mv` command to rename a file or folder, the process involves specifying the current name of the item and the desired new name. For instance, if you wish to rename a file called `newfile` to `newfile1`, you would execute the following command:

```bash
┌──(kali㉿kali)-[~/Desktop]
└─$ touch newfile    
                                                                                                                          
┌──(kali㉿kali)-[~/Desktop]
└─$ mkdir newfolder
                                                                                                                          
┌──(kali㉿kali)-[~/Desktop]
└─$ ls
newfile  newfolder
                                                                                                                          
┌──(kali㉿kali)-[~/Desktop]
└─$ mv newfile newfile1
                                                                                                                          
┌──(kali㉿kali)-[~/Desktop]
└─$ mv newfolder newfolder1
                                                                                                                          
┌──(kali㉿kali)-[~/Desktop]
└─$ ls
newfile1  newfolder1

```

### Removing File and Directory

In Linux, managing files and directories includes the ability to remove (delete) them when they are no longer needed. The process of removing files and directories is straightforward but requires careful attention, as deleted items are typically not recoverable unless you have a backup. Below is an explanation of how to remove files and directories in Linux, along with the commands used for this purpose.

#### **Removing Files**

To delete a file in Linux, the `rm` (remove) command is used. This command permanently deletes the specified file(s) from the filesystem.

#### **Command Syntax:**

```bash
┌──(kali㉿kali)-[~/Desktop]
└─$ rm newfile1
```

**Removing Directories**

Removing directories (folders) requires a slightly different approach because directories can contain files and subdirectories. The `rmdir` and `rm` commands are used for this purpose, depending on whether the directory is empty or contains files.

**a. Removing Empty Directories**

To delete an empty directory, the rmdir command is used. This command only works if the directory contains no files or subdirectories.

**Command Syntax:**

```bash
┌──(kali㉿kali)-[~/Desktop]
└─$ rmdir newfolder1
```

**b. Removing Non-Empty Directories**

To delete a directory that contains files or subdirectories, the rm command with the -r (recursive) option is used. This option ensures that all contents of the directory, including subdirectories and their files, are deleted.

```bash
┌──(kali㉿kali)-[~/Desktop]
└─$ rm -r newfolder
```

***

I guess we covered a massive number of commands on this page. Take a break, review them, and then move on to manipulating texts on the next page of the book.


---

# 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://handbook.ncateam.xyz/fundamentals/linux/basic-linux-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.
