# Linux Terminal

The Linux terminal is the command-line interface (CLI) used in Kali Linux to execute commands, run scripts, and operate various cybersecurity tools. It typically runs on Zsh (Z Shell) by default but also supports Bash and other shells. The terminal allows users to perform essential Linux operations such as navigating the filesystem, managing packages with `apt`, and configuring system settings.

A Linux terminal, also called a **shell or command line**, provides a text-based input/output (I/O) interface between users and the kernel for a computer system.

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

In Windows, the Command Prompt (CMD) is used less frequently because most administrative and user tasks can be performed using a graphical user interface (GUI). Windows users typically rely on menus, settings panels, and graphical applications for system management. Additionally, CMD has limited functionality compared to Linux terminals, and advanced scripting is often done using PowerShell, which provides more capabilities.

In Linux, the terminal is used more frequently because the operating system is built around a command-line-driven environment. Many administrative tasks, package installations, system configurations, and file manipulations are more efficient when done through the command line. Linux users, especially developers, system administrators, and cybersecurity professionals, prefer the terminal for automation, scripting, and executing powerful commands that offer more control over the system. Additionally, many Linux distributions, especially server versions, do not have a GUI by default, making the terminal the primary way to interact with the system.

Additionally, it supports scripting in languages like Python, Bash, Perl, and Ruby, enabling automation of security tasks. The Kali Linux terminal is a crucial component for cybersecurity professionals, providing a flexible and efficient environment for ethical hacking and security assessments.

## Linux Shell Prompt

In Linux, the command prompt provides useful information about the user and their current location in the file system. The prompt typically follows this structure:

```bash
<username>@<hostname><current working directory>$
```

When a user logs in, they start in their home directory, which is represented by a tilde (`~`). For example, the prompt may look like this:

```bash
<username>@<hostname>[~]$
```

The dollar sign (`$`) at the end of the prompt indicates that the user is unprivileged, meaning they have limited permissions. However, if the user switches to the root (administrator) account, the prompt changes, and the dollar sign (`$`) is replaced with a hash (`#`), showing that they now have full control over the system.

* **Unprivileged User Prompt**: `$`
* **Privileged (Root) User Prompt**: `#`

However, Kali Linux uses the Zsh shell instead of Bash by default. Zsh is more flexible and customizable, offering useful features like auto-suggestions, command history-based suggestions, and plugin support, making command-line usage more efficient. While the prompt structure remains similar, there are slight differences in how it behaves and looks due to Zsh’s enhanced customization options.

```bash
┌──(kali㉿kali)-[~]
└─$ COMMAND-HERE
```


---

# 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/linux-terminal.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.
