# Shell Management

### Sanitización de Shell (TTY)

#### Recuperar TTY interactiva

```bash
script /dev/null -c bash
```

Crea una sesión de pseudo-terminal

```bash
# <Ctrl> + <z> para suspender
stty raw -echo; fg
reset xterm
export TERM=xterm
export SHELL=/bin/bash
```

* `stty raw -echo`: Configura terminal en modo raw
* `reset xterm`: Reinicia configuración terminal
* Variables de entorno para shell interactiva

#### Manejo de dimensiones de consola

```bash
stty size
# Muestra filas y columnas actuales

stty rows <ROWS> columns <COLUMNS>
# Ajusta dimensiones de la terminal
```


---

# 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://dise0.gitbook.io/h4cker_b00k/comandos-utiles/shell-management.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.
