> For the complete documentation index, see [llms.txt](https://cybersecurity-cloud-and-it-notes.gitbook.io/kyles-cybersecurity-cloud-and-it-gitbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cybersecurity-cloud-and-it-notes.gitbook.io/kyles-cybersecurity-cloud-and-it-gitbook/hack-the-box/academy/introduction-to-windows-command-line/getting-help.md).

# Getting Help

Summary of "Getting Help"

This lesson provides a comprehensive guide to using the **Command Prompt**'s help functionality, additional resources, and tips to enhance efficiency. Key points include:

**Using the Help Functionality**

1. **Accessing Help**:
   * Typing `help` displays a list of built-in commands and their basic descriptions.
   * To get detailed information about a command, type `help <command>`.
2. **Handling Unsupported Commands**: For some commands (e.g., `ipconfig`), help suggests using a specific flag like `/?` to access detailed usage.

**Importance of Help Utility**

* The **help utility** serves as an offline manual, crucial in scenarios where internet access is restricted, such as secure environments or isolated networks.
* It parallels Linux’s `man` pages, providing syntax and usage details for CMD commands.

**External Resources for Help**

* When internet access is available, resources like **Microsoft Documentation** and **ss64** offer extensive CMD command references.

**Tips and Tricks**

1. **Clearing the Screen**: Use `cls` to clear the terminal for better visibility.
2. **Command History**:
   * Access previous commands using arrow keys, `doskey /history`, or function keys (e.g., `F3`, `F7`).
   * CMD’s command history is session-based and not persistent across instances but can be saved to a file using `doskey`.
3. **Interrupting Processes**: Use `Ctrl + C` to terminate running processes, such as long-running commands or unresponsive applications.

**Why Learn These?**

* Mastering these functionalities equips users to troubleshoot, navigate, and operate efficiently within CMD, even in restricted environments. It balances offline utilities with online resources for versatility.

This foundational knowledge sets the stage for more advanced system navigation and command-line operations.

\--------------

\--------------

\--------------

#### **Getting Help with Command Prompt**

* **Overview**
  * Learn how to use the built-in help functionality in Command Prompt.
  * Understand why the help utility is essential.
  * Discover external resources for further learning.
  * Explore additional tips and tricks for effective use of the Command Prompt.

***

#### **How to Get Help**

* **Default Help Usage**
  * Type `help` to see a list of built-in commands with basic descriptions.
  * Example:

    ```
    C:\htb> help
    ```

    Output includes commands like:

    * `ASSOC`: Modify file extension associations.
    * `ATTRIB`: Change file attributes.
    * `CHKDSK`: Check disk status.
* **Detailed Command Help**
  * To get detailed information about a specific command, type `help <command>`:

    ```
    C:\htb> help time
    ```

    Output:

    * Displays or sets the system time with usage examples.
* **Unsupported Commands**
  * Some commands redirect to alternate help methods, e.g., `ipconfig /?`.

***

#### **Why Use the Help Utility?**

* **Offline Manual**
  * Acts as a reference when no Internet access is available (similar to Linux Man pages).
  * Useful during limited or monitored network scenarios.
* **Practical Example**
  * Imagine being in a restricted environment with no external resources. The help utility provides syntax and usage details necessary for tasks like system enumeration.

***

#### **Where to Find Additional Help**

* **Online Resources**
  * **Microsoft Documentation**: Comprehensive list of commands with descriptions.
  * **SS64**: Quick reference for command-line tools, including cmd and PowerShell.

***

#### **Basic Tips & Tricks**

**1. Clear the Screen**

* Use `cls` to clear the terminal:

  ```
  C:\htb> cls
  ```
* Provides a clean slate to work with.

***

**2. Command History**

* View previously run commands in the current session:
  * Arrow keys (`↑`/`↓`): Scroll through history.
  * `page up`/`page down`: Navigate history.
  * `doskey /history`: Displays session history.

    ```
    C:\htb> doskey /history
    ```

    Output example:

    ```
    systeminfo
    ipconfig /all
    cls
    ```
* **Note:** Command history is not persistent across sessions.

***

**3. Useful Keys for History**

| **Key/Command**   | **Description**                                      |
| ----------------- | ---------------------------------------------------- |
| `doskey /history` | Prints session command history to the terminal/file. |
| `⇧`               | Scroll up through history.                           |
| `⇩`               | Scroll down through recent commands.                 |
| `F3`              | Retypes the last command.                            |
| `F5`              | Cycles through previous commands.                    |
| `F7`              | Opens an interactive list of previous commands.      |
| `F9`              | Retrieves a specific command by its history number.  |

***

**4. Exit a Running Process**

* Press `Ctrl+C` to interrupt or stop a running process.
  * Example:

    ```
    C:\htb> ping 8.8.8.8
    ^C
    ```
* Useful for stopping unresponsive or unnecessary commands.

***

#### **Next Steps**

Now that you're familiar with the help functionality and basic Command Prompt tips, you're ready to explore system navigation and command usage in greater depth.

***

***

***
