linux-commands-guide 2.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. guia_linux/__init__.py +4 -0
  2. guia_linux/cli.py +89 -0
  3. guia_linux/tools/__init__.py +62 -0
  4. guia_linux/tools/awk.py +39 -0
  5. guia_linux/tools/cat.py +29 -0
  6. guia_linux/tools/chmod.py +28 -0
  7. guia_linux/tools/chown.py +22 -0
  8. guia_linux/tools/crontab.py +40 -0
  9. guia_linux/tools/curl.py +29 -0
  10. guia_linux/tools/cut.py +21 -0
  11. guia_linux/tools/df.py +30 -0
  12. guia_linux/tools/docker.py +39 -0
  13. guia_linux/tools/du.py +32 -0
  14. guia_linux/tools/file_descriptors.py +32 -0
  15. guia_linux/tools/find.py +38 -0
  16. guia_linux/tools/firewall_cmd.py +29 -0
  17. guia_linux/tools/free.py +26 -0
  18. guia_linux/tools/git.py +62 -0
  19. guia_linux/tools/grep.py +39 -0
  20. guia_linux/tools/head.py +23 -0
  21. guia_linux/tools/htop.py +25 -0
  22. guia_linux/tools/ifconfig.py +28 -0
  23. guia_linux/tools/ip.py +32 -0
  24. guia_linux/tools/iptables.py +30 -0
  25. guia_linux/tools/jq.py +32 -0
  26. guia_linux/tools/logs.py +48 -0
  27. guia_linux/tools/lsblk.py +29 -0
  28. guia_linux/tools/lsof.py +30 -0
  29. guia_linux/tools/lxc.py +24 -0
  30. guia_linux/tools/nc.py +27 -0
  31. guia_linux/tools/netstat.py +28 -0
  32. guia_linux/tools/nmap.py +33 -0
  33. guia_linux/tools/ps.py +30 -0
  34. guia_linux/tools/regex.py +38 -0
  35. guia_linux/tools/rsync.py +27 -0
  36. guia_linux/tools/scp.py +26 -0
  37. guia_linux/tools/sed.py +26 -0
  38. guia_linux/tools/shortcuts.py +32 -0
  39. guia_linux/tools/sort.py +24 -0
  40. guia_linux/tools/ss.py +32 -0
  41. guia_linux/tools/ssh.py +30 -0
  42. guia_linux/tools/system.py +54 -0
  43. guia_linux/tools/systemctl.py +34 -0
  44. guia_linux/tools/tail.py +25 -0
  45. guia_linux/tools/tar.py +27 -0
  46. guia_linux/tools/tee.py +20 -0
  47. guia_linux/tools/tmux.py +37 -0
  48. guia_linux/tools/top.py +34 -0
  49. guia_linux/tools/tr.py +23 -0
  50. guia_linux/tools/uname.py +24 -0
  51. guia_linux/tools/uniq.py +21 -0
  52. guia_linux/tools/vim.py +58 -0
  53. guia_linux/tools/watch.py +24 -0
  54. guia_linux/tools/xargs.py +23 -0
  55. guia_linux/utils.py +59 -0
  56. linux_commands_guide-2.0.0.dist-info/METADATA +147 -0
  57. linux_commands_guide-2.0.0.dist-info/RECORD +60 -0
  58. linux_commands_guide-2.0.0.dist-info/WHEEL +5 -0
  59. linux_commands_guide-2.0.0.dist-info/entry_points.txt +2 -0
  60. linux_commands_guide-2.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,33 @@
1
+ from shellcolorize import Color
2
+ from guia_linux.utils import print_table
3
+
4
+ TITLE = "Opciones de NMAP"
5
+ TITLE_EN = "NMAP Options"
6
+ BRIEF = "Escáner de redes y puertos"
7
+ BRIEF_EN = "Network and port scanner"
8
+
9
+ COMMANDS = [
10
+ {"command": f"{Color.GREEN}nmap{Color.RESET} host", "description": "Escaneo básico de puertos en un host", "description_en": "Basic port scan on a host"},
11
+ {"command": f"{Color.GREEN}nmap{Color.RESET} -sS host", "description": "Escaneo SYN (sigiloso, requiere root)", "description_en": "SYN scan (stealthy, requires root)"},
12
+ {"command": f"{Color.GREEN}nmap{Color.RESET} -sT host", "description": "Escaneo TCP completo (sin root)", "description_en": "Full TCP connect scan (no root needed)"},
13
+ {"command": f"{Color.GREEN}nmap{Color.RESET} -sU host", "description": "Escaneo de puertos UDP", "description_en": "UDP port scan"},
14
+ {"command": f"{Color.GREEN}nmap{Color.RESET} -sV host", "description": "Detecta versiones de servicios", "description_en": "Detect service versions"},
15
+ {"command": f"{Color.GREEN}nmap{Color.RESET} -O host", "description": "Detecta el sistema operativo", "description_en": "Detect the operating system"},
16
+ {"command": f"{Color.GREEN}nmap{Color.RESET} -A host", "description": "Escaneo completo (OS, versión, scripts, traceroute)", "description_en": "Full scan (OS, version, scripts, traceroute)"},
17
+ {"command": f"{Color.GREEN}nmap{Color.RESET} -p 80,443 host", "description": "Escanea puertos específicos", "description_en": "Scan specific ports"},
18
+ {"command": f"{Color.GREEN}nmap{Color.RESET} -p- host", "description": "Escanea todos los puertos (1-65535)", "description_en": "Scan all 65535 ports"},
19
+ {"command": f"{Color.GREEN}nmap{Color.RESET} -T4 host", "description": "Nivel de agresividad T4 (rápido)", "description_en": "Timing template T4 (fast)"},
20
+ {"command": f"{Color.GREEN}nmap{Color.RESET} --open host", "description": "Muestra solo puertos abiertos", "description_en": "Show only open ports"},
21
+ {"command": f"{Color.GREEN}nmap{Color.RESET} -Pn host", "description": "Escanea sin hacer ping previo", "description_en": "Skip ping, scan directly"},
22
+ {"command": f"{Color.GREEN}nmap{Color.RESET} -sC host", "description": "Ejecuta scripts de detección básicos", "description_en": "Run default detection scripts"},
23
+ {"command": f"{Color.GREEN}nmap{Color.RESET} --script=http-title host", "description": "Ejecuta un script específico de NSE", "description_en": "Run a specific NSE script"},
24
+ {"command": f"{Color.GREEN}nmap{Color.RESET} -iL targets.txt", "description": "Escanea una lista de hosts desde archivo", "description_en": "Scan a list of hosts from a file"},
25
+ {"command": f"{Color.GREEN}nmap{Color.RESET} -oN scan.txt host", "description": "Guarda la salida en formato normal", "description_en": "Save output in normal format"},
26
+ {"command": f"{Color.GREEN}nmap{Color.RESET} -oX scan.xml host", "description": "Guarda la salida en formato XML", "description_en": "Save output in XML format"},
27
+ {"command": f"{Color.GREEN}nmap{Color.RESET} --traceroute host", "description": "Realiza un traceroute al host", "description_en": "Run a traceroute to the host"},
28
+ ]
29
+
30
+
31
+ def show(lang: str = "es") -> None:
32
+ title = TITLE_EN if lang == "en" else TITLE
33
+ print_table(title, COMMANDS, lang)
guia_linux/tools/ps.py ADDED
@@ -0,0 +1,30 @@
1
+ from shellcolorize import Color
2
+ from guia_linux.utils import print_table
3
+
4
+ TITLE = "Opciones de PS"
5
+ TITLE_EN = "PS Options"
6
+ BRIEF = "Información sobre procesos en ejecución"
7
+ BRIEF_EN = "Information about running processes"
8
+
9
+ COMMANDS = [
10
+ {"command": f"{Color.GREEN}ps{Color.RESET}", "description": "Muestra procesos de la terminal actual", "description_en": "Show processes for the current terminal"},
11
+ {"command": f"{Color.GREEN}ps{Color.RESET} aux", "description": "Muestra todos los procesos (estilo BSD)", "description_en": "Show all processes (BSD style)"},
12
+ {"command": f"{Color.GREEN}ps{Color.RESET} -A", "description": "Muestra todos los procesos del sistema", "description_en": "Show all system processes"},
13
+ {"command": f"{Color.GREEN}ps{Color.RESET} -e", "description": "Similar a -A; todos los procesos", "description_en": "Same as -A; all processes"},
14
+ {"command": f"{Color.GREEN}ps{Color.RESET} -f", "description": "Formato detallado con relaciones padre-hijo (PPID)", "description_en": "Full format showing parent-child relationships"},
15
+ {"command": f"{Color.GREEN}ps{Color.RESET} -u <user>", "description": "Procesos de un usuario específico", "description_en": "Processes of a specific user"},
16
+ {"command": f"{Color.GREEN}ps{Color.RESET} -p <pid>", "description": "Información de un proceso por PID", "description_en": "Information for a specific PID"},
17
+ {"command": f"{Color.GREEN}ps{Color.RESET} -C <command>", "description": "Procesos ejecutados por el comando dado", "description_en": "Processes running the given command"},
18
+ {"command": f"{Color.GREEN}ps{Color.RESET} -o pid,user,%cpu,%mem", "description": "Columnas personalizadas en la salida", "description_en": "Custom output columns"},
19
+ {"command": f"{Color.GREEN}ps{Color.RESET} -H", "description": "Muestra procesos en formato jerárquico", "description_en": "Show processes in hierarchical format"},
20
+ {"command": f"{Color.GREEN}ps{Color.RESET} --sort=%cpu", "description": "Ordena por uso de CPU", "description_en": "Sort by CPU usage"},
21
+ {"command": f"{Color.GREEN}ps{Color.RESET} --sort=-%mem", "description": "Ordena por memoria (descendente)", "description_en": "Sort by memory usage (descending)"},
22
+ {"command": f"{Color.GREEN}ps{Color.RESET} --forest", "description": "Vista en árbol de procesos", "description_en": "Tree view of processes"},
23
+ {"command": f"{Color.GREEN}ps{Color.RESET} -L", "description": "Muestra los hilos de los procesos", "description_en": "Show process threads"},
24
+ {"command": f"{Color.GREEN}ps{Color.RESET} -eo pid,user,pcpu,pmem,comm", "description": "Salida personalizada de todos los procesos", "description_en": "Custom output for all processes"},
25
+ ]
26
+
27
+
28
+ def show(lang: str = "es") -> None:
29
+ title = TITLE_EN if lang == "en" else TITLE
30
+ print_table(title, COMMANDS, lang)
@@ -0,0 +1,38 @@
1
+ from shellcolorize import Color
2
+ from guia_linux.utils import print_table
3
+
4
+ TITLE = "Expresiones Regulares"
5
+ TITLE_EN = "Regular Expressions"
6
+ BRIEF = "Patrones de búsqueda con regex"
7
+ BRIEF_EN = "Regex search patterns"
8
+
9
+ COMMANDS = [
10
+ {"pattern": f"{Color.YELLOW}^word{Color.RESET}", "description": "Coincide con 'word' al inicio de la línea", "description_en": "Match 'word' at the start of the line"},
11
+ {"pattern": f"{Color.YELLOW}word${Color.RESET}", "description": "Coincide con 'word' al final de la línea", "description_en": "Match 'word' at the end of the line"},
12
+ {"pattern": f"{Color.YELLOW}\\bword\\b{Color.RESET}", "description": "Coincide con 'word' como palabra completa", "description_en": "Match 'word' as a whole word"},
13
+ {"pattern": f"{Color.YELLOW}.{Color.RESET}", "description": "Cualquier carácter excepto nueva línea", "description_en": "Any character except newline"},
14
+ {"pattern": f"{Color.YELLOW}\\d{Color.RESET}", "description": "Cualquier dígito (equivale a [0-9])", "description_en": "Any digit (equivalent to [0-9])"},
15
+ {"pattern": f"{Color.YELLOW}\\D{Color.RESET}", "description": "Cualquier carácter que NO sea dígito", "description_en": "Any non-digit character"},
16
+ {"pattern": f"{Color.YELLOW}\\w{Color.RESET}", "description": "Letra, dígito o guion bajo", "description_en": "Word character: letter, digit or underscore"},
17
+ {"pattern": f"{Color.YELLOW}\\W{Color.RESET}", "description": "Carácter que NO sea de palabra", "description_en": "Non-word character"},
18
+ {"pattern": f"{Color.YELLOW}\\s{Color.RESET}", "description": "Espacio en blanco (espacio, tabulación, nueva línea)", "description_en": "Whitespace (space, tab, newline)"},
19
+ {"pattern": f"{Color.YELLOW}\\S{Color.RESET}", "description": "Carácter que NO sea espacio en blanco", "description_en": "Non-whitespace character"},
20
+ {"pattern": f"{Color.YELLOW}[aeiou]{Color.RESET}", "description": "Cualquier vocal minúscula", "description_en": "Any lowercase vowel"},
21
+ {"pattern": f"{Color.YELLOW}[^aeiou]{Color.RESET}", "description": "Cualquier carácter que NO sea vocal minúscula", "description_en": "Any character that is NOT a lowercase vowel"},
22
+ {"pattern": f"{Color.YELLOW}[A-Za-z]{Color.RESET}", "description": "Cualquier letra mayúscula o minúscula", "description_en": "Any uppercase or lowercase letter"},
23
+ {"pattern": f"{Color.YELLOW}word{{3}}{Color.RESET}", "description": "Exactamente 3 repeticiones de 'word'", "description_en": "Exactly 3 repetitions of 'word'"},
24
+ {"pattern": f"{Color.YELLOW}word{{2,5}}{Color.RESET}", "description": "Entre 2 y 5 repeticiones de 'word'", "description_en": "Between 2 and 5 repetitions of 'word'"},
25
+ {"pattern": f"{Color.YELLOW}word*{Color.RESET}", "description": "0 o más repeticiones", "description_en": "0 or more repetitions"},
26
+ {"pattern": f"{Color.YELLOW}word+{Color.RESET}", "description": "1 o más repeticiones", "description_en": "1 or more repetitions"},
27
+ {"pattern": f"{Color.YELLOW}word?{Color.RESET}", "description": "0 o 1 repetición", "description_en": "0 or 1 repetition"},
28
+ {"pattern": f"{Color.YELLOW}(w1|w2){Color.RESET}", "description": "Coincide con 'w1' o 'w2'", "description_en": "Match 'w1' or 'w2'"},
29
+ {"pattern": f"{Color.YELLOW}(?<=@)\\w+{Color.RESET}", "description": "Palabra precedida de '@' (lookbehind positivo)", "description_en": "Word preceded by '@' (positive lookbehind)"},
30
+ {"pattern": f"{Color.YELLOW}\\w+(?=\\.com){Color.RESET}", "description": "Palabra seguida de '.com' (lookahead positivo)", "description_en": "Word followed by '.com' (positive lookahead)"},
31
+ {"pattern": f"{Color.YELLOW}(?i)word{Color.RESET}", "description": "Coincide ignorando mayúsculas/minúsculas", "description_en": "Case-insensitive match"},
32
+ {"pattern": f"{Color.YELLOW}^${Color.RESET}", "description": "Línea vacía", "description_en": "Empty line"},
33
+ ]
34
+
35
+
36
+ def show(lang: str = "es") -> None:
37
+ title = TITLE_EN if lang == "en" else TITLE
38
+ print_table(title, COMMANDS, lang)
@@ -0,0 +1,27 @@
1
+ from shellcolorize import Color
2
+ from guia_linux.utils import print_table
3
+
4
+ TITLE = "Opciones de RSYNC"
5
+ TITLE_EN = "RSYNC Options"
6
+ BRIEF = "Sincronización eficiente de archivos"
7
+ BRIEF_EN = "Efficient file synchronization"
8
+
9
+ COMMANDS = [
10
+ {"command": f"{Color.GREEN}rsync{Color.RESET} -av src/ dst/", "description": "Sincroniza src/ en dst/ con salida verbose", "description_en": "Sync src/ to dst/ with verbose output"},
11
+ {"command": f"{Color.GREEN}rsync{Color.RESET} -avz src/ user@host:/dst/", "description": "Sincroniza con compresión a un host remoto", "description_en": "Sync with compression to a remote host"},
12
+ {"command": f"{Color.GREEN}rsync{Color.RESET} -avz user@host:/src/ dst/", "description": "Descarga desde un host remoto con compresión", "description_en": "Download from a remote host with compression"},
13
+ {"command": f"{Color.GREEN}rsync{Color.RESET} --delete src/ dst/", "description": "Elimina en dst/ los archivos que no existen en src/", "description_en": "Delete files in dst/ that don't exist in src/"},
14
+ {"command": f"{Color.GREEN}rsync{Color.RESET} --dry-run src/ dst/", "description": "Simula la sincronización sin realizar cambios", "description_en": "Simulate sync without making changes"},
15
+ {"command": f"{Color.GREEN}rsync{Color.RESET} -a --progress src/ dst/", "description": "Muestra el progreso de cada archivo", "description_en": "Show per-file transfer progress"},
16
+ {"command": f"{Color.GREEN}rsync{Color.RESET} --exclude='*.log' src/ dst/", "description": "Excluye archivos que coincidan con el patrón", "description_en": "Exclude files matching the pattern"},
17
+ {"command": f"{Color.GREEN}rsync{Color.RESET} --exclude-from=list.txt src/ dst/", "description": "Lee exclusiones desde un archivo", "description_en": "Read exclusions from a file"},
18
+ {"command": f"{Color.GREEN}rsync{Color.RESET} -e 'ssh -p 2222' src/ user@host:/dst/", "description": "Usa SSH con un puerto no estándar", "description_en": "Use SSH with a non-standard port"},
19
+ {"command": f"{Color.GREEN}rsync{Color.RESET} --checksum src/ dst/", "description": "Compara por checksum en lugar de timestamp/tamaño", "description_en": "Compare by checksum instead of timestamp/size"},
20
+ {"command": f"{Color.GREEN}rsync{Color.RESET} -a --bwlimit=1000 src/ dst/", "description": "Limita el ancho de banda a 1000 KB/s", "description_en": "Limit bandwidth to 1000 KB/s"},
21
+ {"command": f"{Color.GREEN}rsync{Color.RESET} --backup --backup-dir=/backup src/ dst/", "description": "Guarda copias de archivos sobreescritos", "description_en": "Keep backups of overwritten files"},
22
+ ]
23
+
24
+
25
+ def show(lang: str = "es") -> None:
26
+ title = TITLE_EN if lang == "en" else TITLE
27
+ print_table(title, COMMANDS, lang)
@@ -0,0 +1,26 @@
1
+ from shellcolorize import Color
2
+ from guia_linux.utils import print_table
3
+
4
+ TITLE = "Opciones de SCP"
5
+ TITLE_EN = "SCP Options"
6
+ BRIEF = "Copia segura de archivos via SSH"
7
+ BRIEF_EN = "Secure file copy over SSH"
8
+
9
+ COMMANDS = [
10
+ {"command": f"{Color.GREEN}scp{Color.RESET} file user@host:/path", "description": "Copia un archivo al servidor remoto", "description_en": "Copy a file to the remote server"},
11
+ {"command": f"{Color.GREEN}scp{Color.RESET} user@host:/path/file .", "description": "Descarga un archivo del servidor remoto", "description_en": "Download a file from the remote server"},
12
+ {"command": f"{Color.GREEN}scp{Color.RESET} -r dir user@host:/path", "description": "Copia un directorio completo de forma recursiva", "description_en": "Copy a directory recursively"},
13
+ {"command": f"{Color.GREEN}scp{Color.RESET} -p file user@host:/path", "description": "Preserva permisos y marcas de tiempo", "description_en": "Preserve permissions and timestamps"},
14
+ {"command": f"{Color.GREEN}scp{Color.RESET} -P <port> file user@host:/path", "description": "Usa el puerto SSH especificado", "description_en": "Use the specified SSH port"},
15
+ {"command": f"{Color.GREEN}scp{Color.RESET} -i key.pem file user@host:/path", "description": "Usa una clave privada para la autenticación", "description_en": "Use a private key for authentication"},
16
+ {"command": f"{Color.GREEN}scp{Color.RESET} -C file user@host:/path", "description": "Habilita la compresión de datos", "description_en": "Enable data compression"},
17
+ {"command": f"{Color.GREEN}scp{Color.RESET} -v file user@host:/path", "description": "Modo verbose — salida detallada", "description_en": "Verbose mode — detailed output"},
18
+ {"command": f"{Color.GREEN}scp{Color.RESET} -q file user@host:/path", "description": "Silencia errores y progreso", "description_en": "Quiet mode — suppress errors and progress"},
19
+ {"command": f"{Color.GREEN}scp{Color.RESET} -l <limit> file user@host:/path", "description": "Limita el ancho de banda en Kbit/s", "description_en": "Limit bandwidth in Kbit/s"},
20
+ {"command": f"{Color.GREEN}scp{Color.RESET} -o StrictHostKeyChecking=no file user@host:/path", "description": "Desactiva la verificación del host", "description_en": "Disable host key checking"},
21
+ ]
22
+
23
+
24
+ def show(lang: str = "es") -> None:
25
+ title = TITLE_EN if lang == "en" else TITLE
26
+ print_table(title, COMMANDS, lang)
@@ -0,0 +1,26 @@
1
+ from shellcolorize import Color
2
+ from guia_linux.utils import print_table
3
+
4
+ TITLE = "Opciones de SED"
5
+ TITLE_EN = "SED Options"
6
+ BRIEF = "Editor de flujo de texto"
7
+ BRIEF_EN = "Stream text editor"
8
+
9
+ COMMANDS = [
10
+ {"command": f"{Color.GREEN}sed{Color.RESET} 's/old/new/g' filename", "description": "Reemplaza todas las ocurrencias de 'old' por 'new'", "description_en": "Replace all occurrences of 'old' with 'new'"},
11
+ {"command": f"{Color.GREEN}sed{Color.RESET} -i 's/old/new/g' filename", "description": "Edita el archivo directamente (in-place)", "description_en": "Edit file in-place"},
12
+ {"command": f"{Color.GREEN}sed{Color.RESET} '1d' filename", "description": "Elimina la primera línea", "description_en": "Delete the first line"},
13
+ {"command": f"{Color.GREEN}sed{Color.RESET} '$d' filename", "description": "Elimina la última línea", "description_en": "Delete the last line"},
14
+ {"command": f"{Color.GREEN}sed{Color.RESET} -n '5,10p' filename", "description": "Muestra solo las líneas de la 5 a la 10", "description_en": "Print only lines 5 through 10"},
15
+ {"command": f"{Color.GREEN}sed{Color.RESET} 's/^/# /' filename", "description": "Añade '#' al inicio de cada línea", "description_en": "Add '#' at the beginning of every line"},
16
+ {"command": f"{Color.GREEN}sed{Color.RESET} '/pattern/d' filename", "description": "Elimina líneas que coinciden con 'pattern'", "description_en": "Delete lines matching 'pattern'"},
17
+ {"command": f"{Color.GREEN}sed{Color.RESET} -e 's/a/b/' -e 's/c/d/' filename", "description": "Aplica múltiples sustituciones", "description_en": "Apply multiple substitutions"},
18
+ {"command": f"{Color.GREEN}sed{Color.RESET} -r 's/[0-9]+/num/g' filename", "description": "Usa regex extendida para reemplazar números", "description_en": "Use extended regex to replace numbers"},
19
+ {"command": f"{Color.GREEN}sed{Color.RESET} -n '/pattern/p' filename", "description": "Imprime solo las líneas que coinciden con 'pattern'", "description_en": "Print only lines matching 'pattern'"},
20
+ {"command": f"{Color.GREEN}sed{Color.RESET} '2,5s/old/new/' filename", "description": "Reemplaza 'old' por 'new' solo en las líneas 2-5", "description_en": "Replace 'old' with 'new' only on lines 2-5"},
21
+ ]
22
+
23
+
24
+ def show(lang: str = "es") -> None:
25
+ title = TITLE_EN if lang == "en" else TITLE
26
+ print_table(title, COMMANDS, lang)
@@ -0,0 +1,32 @@
1
+ from shellcolorize import Color
2
+ from guia_linux.utils import print_table
3
+
4
+ TITLE = "Atajos de teclado en la terminal"
5
+ TITLE_EN = "Terminal Keyboard Shortcuts"
6
+ BRIEF = "Atajos de teclado de bash/zsh"
7
+ BRIEF_EN = "Bash/zsh keyboard shortcuts"
8
+
9
+ COMMANDS = [
10
+ {"command": f"{Color.GREEN}[TAB]{Color.RESET}", "description": "Autocompleta comandos, rutas y opciones", "description_en": "Autocomplete commands, paths and options"},
11
+ {"command": f"{Color.GREEN}[CTRL] + A{Color.RESET}", "description": "Mueve el cursor al inicio de la línea", "description_en": "Move cursor to beginning of line"},
12
+ {"command": f"{Color.GREEN}[CTRL] + E{Color.RESET}", "description": "Mueve el cursor al final de la línea", "description_en": "Move cursor to end of line"},
13
+ {"command": f"{Color.GREEN}[CTRL] + ← / →{Color.RESET}", "description": "Salta a la palabra anterior/siguiente", "description_en": "Jump to previous/next word"},
14
+ {"command": f"{Color.GREEN}[ALT] + B / F{Color.RESET}", "description": "Retrocede/avanza una palabra", "description_en": "Move backward/forward one word"},
15
+ {"command": f"{Color.GREEN}[CTRL] + U{Color.RESET}", "description": "Elimina desde el cursor al inicio de línea", "description_en": "Delete from cursor to beginning of line"},
16
+ {"command": f"{Color.GREEN}[CTRL] + K{Color.RESET}", "description": "Elimina desde el cursor al final de línea", "description_en": "Delete from cursor to end of line"},
17
+ {"command": f"{Color.GREEN}[CTRL] + W{Color.RESET}", "description": "Elimina la palabra anterior al cursor", "description_en": "Delete the word before the cursor"},
18
+ {"command": f"{Color.GREEN}[CTRL] + Y{Color.RESET}", "description": "Pega el último texto eliminado (yank)", "description_en": "Paste the last deleted text (yank)"},
19
+ {"command": f"{Color.GREEN}[CTRL] + C{Color.RESET}", "description": "Termina el proceso en ejecución (SIGINT)", "description_en": "Terminate the running process (SIGINT)"},
20
+ {"command": f"{Color.GREEN}[CTRL] + D{Color.RESET}", "description": "Cierra stdin (EOF) / sale del shell", "description_en": "Close stdin (EOF) / exit the shell"},
21
+ {"command": f"{Color.GREEN}[CTRL] + L{Color.RESET}", "description": "Limpia la terminal (equivale a 'clear')", "description_en": "Clear the terminal (same as 'clear')"},
22
+ {"command": f"{Color.GREEN}[CTRL] + Z{Color.RESET}", "description": "Suspende el proceso actual (SIGTSTP)", "description_en": "Suspend the current process (SIGTSTP)"},
23
+ {"command": f"{Color.GREEN}[CTRL] + R{Color.RESET}", "description": "Busca en el historial de comandos", "description_en": "Search command history"},
24
+ {"command": f"{Color.GREEN}[↑] / [↓]{Color.RESET}", "description": "Navega por el historial de comandos", "description_en": "Navigate command history"},
25
+ {"command": f"{Color.GREEN}[CTRL] + [+]{Color.RESET}", "description": "Aumenta el zoom del terminal", "description_en": "Increase terminal zoom"},
26
+ {"command": f"{Color.GREEN}[CTRL] + [-]{Color.RESET}", "description": "Disminuye el zoom del terminal", "description_en": "Decrease terminal zoom"},
27
+ ]
28
+
29
+
30
+ def show(lang: str = "es") -> None:
31
+ title = TITLE_EN if lang == "en" else TITLE
32
+ print_table(title, COMMANDS, lang)
@@ -0,0 +1,24 @@
1
+ from shellcolorize import Color
2
+ from guia_linux.utils import print_table
3
+
4
+ TITLE = "Opciones de SORT"
5
+ TITLE_EN = "SORT Options"
6
+ BRIEF = "Ordena líneas de texto"
7
+ BRIEF_EN = "Sort lines of text"
8
+
9
+ COMMANDS = [
10
+ {"command": f"{Color.GREEN}sort{Color.RESET} filename", "description": "Ordena las líneas alfabéticamente", "description_en": "Sort lines alphabetically"},
11
+ {"command": f"{Color.GREEN}sort{Color.RESET} -n filename", "description": "Ordena las líneas numéricamente", "description_en": "Sort lines numerically"},
12
+ {"command": f"{Color.GREEN}sort{Color.RESET} -r filename", "description": "Ordena en orden inverso", "description_en": "Sort in reverse order"},
13
+ {"command": f"{Color.GREEN}sort{Color.RESET} -u filename", "description": "Elimina duplicados y ordena", "description_en": "Remove duplicates and sort"},
14
+ {"command": f"{Color.GREEN}sort{Color.RESET} -k2,2 -n filename", "description": "Ordena numéricamente por la segunda columna", "description_en": "Sort numerically by the second column"},
15
+ {"command": f"{Color.GREEN}sort{Color.RESET} -t',' -k1,1 filename", "description": "Ordena por el primer campo con ',' como delimitador", "description_en": "Sort by first field using ',' as delimiter"},
16
+ {"command": f"{Color.GREEN}sort{Color.RESET} -m file1 file2", "description": "Combina y ordena archivos ya ordenados", "description_en": "Merge already-sorted files"},
17
+ {"command": f"{Color.GREEN}sort{Color.RESET} -h filename", "description": "Ordena tamaños legibles (1K, 2M, 3G)", "description_en": "Sort human-readable sizes (1K, 2M, 3G)"},
18
+ {"command": f"{Color.GREEN}sort{Color.RESET} -f filename", "description": "Ignora mayúsculas/minúsculas en el ordenamiento", "description_en": "Ignore case when sorting"},
19
+ ]
20
+
21
+
22
+ def show(lang: str = "es") -> None:
23
+ title = TITLE_EN if lang == "en" else TITLE
24
+ print_table(title, COMMANDS, lang)
guia_linux/tools/ss.py ADDED
@@ -0,0 +1,32 @@
1
+ from shellcolorize import Color
2
+ from guia_linux.utils import print_table
3
+
4
+ TITLE = "Opciones de SS"
5
+ TITLE_EN = "SS Options"
6
+ BRIEF = "Estadísticas de sockets (reemplaza netstat)"
7
+ BRIEF_EN = "Socket statistics (replaces netstat)"
8
+
9
+ COMMANDS = [
10
+ {"command": f"{Color.GREEN}ss{Color.RESET}", "description": "Muestra todos los sockets abiertos", "description_en": "Show all open sockets"},
11
+ {"command": f"{Color.GREEN}ss{Color.RESET} -a", "description": "Muestra todos los sockets (en escucha y conectados)", "description_en": "Show all sockets (listening and connected)"},
12
+ {"command": f"{Color.GREEN}ss{Color.RESET} -t", "description": "Muestra solo conexiones TCP", "description_en": "Show only TCP connections"},
13
+ {"command": f"{Color.GREEN}ss{Color.RESET} -u", "description": "Muestra solo conexiones UDP", "description_en": "Show only UDP connections"},
14
+ {"command": f"{Color.GREEN}ss{Color.RESET} -l", "description": "Muestra solo puertos en escucha", "description_en": "Show only listening ports"},
15
+ {"command": f"{Color.GREEN}ss{Color.RESET} -p", "description": "Muestra el proceso asociado a cada socket", "description_en": "Show the process associated with each socket"},
16
+ {"command": f"{Color.GREEN}ss{Color.RESET} -n", "description": "Muestra IPs y puertos en formato numérico", "description_en": "Show IPs and ports in numeric format"},
17
+ {"command": f"{Color.GREEN}ss{Color.RESET} -tulnp", "description": "Combinación común: TCP/UDP puertos en escucha con PID", "description_en": "Common combo: TCP/UDP listening ports with PID"},
18
+ {"command": f"{Color.GREEN}ss{Color.RESET} -s", "description": "Muestra un resumen de estadísticas", "description_en": "Show a statistics summary"},
19
+ {"command": f"{Color.GREEN}ss{Color.RESET} -4", "description": "Muestra solo sockets IPv4", "description_en": "Show only IPv4 sockets"},
20
+ {"command": f"{Color.GREEN}ss{Color.RESET} -6", "description": "Muestra solo sockets IPv6", "description_en": "Show only IPv6 sockets"},
21
+ {"command": f"{Color.GREEN}ss{Color.RESET} -x", "description": "Muestra sockets de dominio Unix", "description_en": "Show Unix domain sockets"},
22
+ {"command": f"{Color.GREEN}ss{Color.RESET} -o", "description": "Muestra información de tiempo de los sockets", "description_en": "Show socket timer information"},
23
+ {"command": f"{Color.GREEN}ss{Color.RESET} sport = :80", "description": "Filtra sockets por puerto de origen", "description_en": "Filter sockets by source port"},
24
+ {"command": f"{Color.GREEN}ss{Color.RESET} dport = :443", "description": "Filtra sockets por puerto de destino", "description_en": "Filter sockets by destination port"},
25
+ {"command": f"{Color.GREEN}ss{Color.RESET} -t state established", "description": "Muestra solo conexiones TCP establecidas", "description_en": "Show only established TCP connections"},
26
+ {"command": f"{Color.GREEN}ss{Color.RESET} -t state time-wait", "description": "Muestra conexiones en estado TIME-WAIT", "description_en": "Show connections in TIME-WAIT state"},
27
+ ]
28
+
29
+
30
+ def show(lang: str = "es") -> None:
31
+ title = TITLE_EN if lang == "en" else TITLE
32
+ print_table(title, COMMANDS, lang)
@@ -0,0 +1,30 @@
1
+ from shellcolorize import Color
2
+ from guia_linux.utils import print_table
3
+
4
+ TITLE = "Opciones de SSH"
5
+ TITLE_EN = "SSH Options"
6
+ BRIEF = "Cliente de shell seguro (Secure Shell)"
7
+ BRIEF_EN = "Secure Shell client"
8
+
9
+ COMMANDS = [
10
+ {"command": f"{Color.GREEN}ssh{Color.RESET} user@host", "description": "Conecta al host como el usuario dado", "description_en": "Connect to host as the given user"},
11
+ {"command": f"{Color.GREEN}ssh{Color.RESET} -p <port> user@host", "description": "Conecta usando el puerto especificado", "description_en": "Connect using the specified port"},
12
+ {"command": f"{Color.GREEN}ssh{Color.RESET} -i key.pem user@host", "description": "Usa una clave privada para autenticación", "description_en": "Use a private key for authentication"},
13
+ {"command": f"{Color.GREEN}ssh{Color.RESET} -L 8080:localhost:80 user@host", "description": "Túnel local: redirige el puerto local 8080 al 80 del host", "description_en": "Local tunnel: forward local port 8080 to host port 80"},
14
+ {"command": f"{Color.GREEN}ssh{Color.RESET} -R 9090:localhost:8080 user@host", "description": "Túnel remoto: redirige el puerto 9090 del host al local 8080", "description_en": "Remote tunnel: forward host port 9090 to local port 8080"},
15
+ {"command": f"{Color.GREEN}ssh{Color.RESET} -D 1080 user@host", "description": "Crea un proxy SOCKS dinámico en el puerto 1080", "description_en": "Create a dynamic SOCKS proxy on port 1080"},
16
+ {"command": f"{Color.GREEN}ssh{Color.RESET} -N user@host", "description": "No ejecuta comandos — solo túneles", "description_en": "Do not execute commands — tunnels only"},
17
+ {"command": f"{Color.GREEN}ssh{Color.RESET} -X user@host", "description": "Habilita el reenvío de X11 (GUI remota)", "description_en": "Enable X11 forwarding (remote GUI)"},
18
+ {"command": f"{Color.GREEN}ssh{Color.RESET} -A user@host", "description": "Habilita el reenvío del agente SSH", "description_en": "Enable SSH agent forwarding"},
19
+ {"command": f"{Color.GREEN}ssh{Color.RESET} -v user@host", "description": "Modo verbose — útil para depurar conexiones", "description_en": "Verbose mode — useful for debugging"},
20
+ {"command": f"{Color.GREEN}ssh{Color.RESET} -o StrictHostKeyChecking=no user@host", "description": "Desactiva la verificación de clave del host", "description_en": "Disable host key checking"},
21
+ {"command": f"{Color.GREEN}ssh{Color.RESET} user@host 'command'", "description": "Ejecuta un comando remoto sin shell interactiva", "description_en": "Run a remote command without interactive shell"},
22
+ {"command": f"{Color.GREEN}ssh-keygen{Color.RESET} -t ed25519", "description": "Genera un par de claves SSH (algoritmo moderno)", "description_en": "Generate an SSH key pair (modern algorithm)"},
23
+ {"command": f"{Color.GREEN}ssh-copy-id{Color.RESET} user@host", "description": "Copia la clave pública al host remoto", "description_en": "Copy the public key to the remote host"},
24
+ {"command": f"{Color.GREEN}ssh-add{Color.RESET} key.pem", "description": "Añade una clave privada al agente SSH", "description_en": "Add a private key to the SSH agent"},
25
+ ]
26
+
27
+
28
+ def show(lang: str = "es") -> None:
29
+ title = TITLE_EN if lang == "en" else TITLE
30
+ print_table(title, COMMANDS, lang)
@@ -0,0 +1,54 @@
1
+ from shellcolorize import Color
2
+ from guia_linux.utils import print_table
3
+
4
+ TITLE = "Comandos básicos del sistema"
5
+ TITLE_EN = "Basic System Commands"
6
+ BRIEF = "Navegación, archivos y gestión del sistema"
7
+ BRIEF_EN = "Navigation, files and system management"
8
+
9
+ COMMANDS = [
10
+ {"section": "Navegación de directorios", "section_en": "Directory Navigation"},
11
+ {"command": f"{Color.GREEN}cd{Color.RESET} <directory>", "description": "Cambia al directorio especificado", "description_en": "Change to the specified directory"},
12
+ {"command": f"{Color.GREEN}pwd{Color.RESET}", "description": "Imprime el directorio de trabajo actual", "description_en": "Print the current working directory"},
13
+ {"command": f"{Color.GREEN}pushd{Color.RESET} <directory>", "description": "Guarda el directorio actual y cambia al indicado", "description_en": "Save current directory and switch to the given one"},
14
+ {"command": f"{Color.GREEN}popd{Color.RESET}", "description": "Vuelve al directorio guardado anteriormente", "description_en": "Return to the previously saved directory"},
15
+ {"command": f"{Color.GREEN}dirs{Color.RESET}", "description": "Muestra la pila de directorios", "description_en": "Show the directory stack"},
16
+
17
+ {"section": "Gestión de archivos y directorios", "section_en": "File and Directory Management"},
18
+ {"command": f"{Color.GREEN}touch{Color.RESET} <file>", "description": "Crea un archivo vacío o actualiza su timestamp", "description_en": "Create an empty file or update its timestamp"},
19
+ {"command": f"{Color.GREEN}mkdir{Color.RESET} <directory>", "description": "Crea un nuevo directorio", "description_en": "Create a new directory"},
20
+ {"command": f"{Color.GREEN}mkdir{Color.RESET} -p <path>", "description": "Crea directorios incluyendo los padres necesarios", "description_en": "Create directory and all parent directories"},
21
+ {"command": f"{Color.GREEN}rm{Color.RESET} <file>", "description": "Elimina un archivo", "description_en": "Remove a file"},
22
+ {"command": f"{Color.GREEN}rm{Color.RESET} -r <directory>", "description": "Elimina un directorio y su contenido", "description_en": "Remove a directory and its contents"},
23
+ {"command": f"{Color.GREEN}cp{Color.RESET} <src> <dst>", "description": "Copia un archivo", "description_en": "Copy a file"},
24
+ {"command": f"{Color.GREEN}cp{Color.RESET} -r <src_dir> <dst>", "description": "Copia un directorio de forma recursiva", "description_en": "Copy a directory recursively"},
25
+ {"command": f"{Color.GREEN}mv{Color.RESET} <src> <dst>", "description": "Mueve o renombra un archivo o directorio", "description_en": "Move or rename a file or directory"},
26
+ {"command": f"{Color.GREEN}ln{Color.RESET} -s <target> <link>", "description": "Crea un enlace simbólico", "description_en": "Create a symbolic link"},
27
+ {"command": f"{Color.GREEN}locate{Color.RESET} <filename>", "description": "Busca archivos usando la base de datos de locate", "description_en": "Find files using the locate database"},
28
+
29
+ {"section": "Visualización de archivos", "section_en": "File Viewing"},
30
+ {"command": f"{Color.GREEN}cat{Color.RESET} <file>", "description": "Muestra el contenido de un archivo", "description_en": "Display file contents"},
31
+ {"command": f"{Color.GREEN}less{Color.RESET} <file>", "description": "Muestra el contenido de forma interactiva", "description_en": "Display file contents interactively"},
32
+ {"command": f"{Color.GREEN}more{Color.RESET} <file>", "description": "Muestra el contenido página por página", "description_en": "Display file contents page by page"},
33
+ {"command": f"{Color.GREEN}nl{Color.RESET} <file>", "description": "Muestra el contenido con números de línea", "description_en": "Display file contents with line numbers"},
34
+
35
+ {"section": "Información del sistema", "section_en": "System Information"},
36
+ {"command": f"{Color.GREEN}stat{Color.RESET} <file>", "description": "Muestra detalles del archivo (timestamps, permisos)", "description_en": "Show file details (timestamps, permissions)"},
37
+ {"command": f"{Color.GREEN}date{Color.RESET}", "description": "Muestra la fecha y hora actuales", "description_en": "Show current date and time"},
38
+ {"command": f"{Color.GREEN}uptime{Color.RESET}", "description": "Muestra el tiempo que lleva encendido el sistema", "description_en": "Show how long the system has been running"},
39
+ {"command": f"{Color.GREEN}whoami{Color.RESET}", "description": "Muestra el usuario actual", "description_en": "Show the current user"},
40
+ {"command": f"{Color.GREEN}id{Color.RESET}", "description": "Muestra el UID, GID y grupos del usuario actual", "description_en": "Show UID, GID and groups of current user"},
41
+ {"command": f"{Color.GREEN}hostname{Color.RESET}", "description": "Muestra o establece el nombre del host", "description_en": "Show or set the hostname"},
42
+
43
+ {"section": "Listado de directorios", "section_en": "Directory Listing"},
44
+ {"command": f"{Color.GREEN}ls{Color.RESET}", "description": "Lista el contenido del directorio actual", "description_en": "List the current directory contents"},
45
+ {"command": f"{Color.GREEN}ls{Color.RESET} -a", "description": "Incluye archivos ocultos", "description_en": "Include hidden files"},
46
+ {"command": f"{Color.GREEN}ls{Color.RESET} -l", "description": "Formato largo con detalles", "description_en": "Long format with details"},
47
+ {"command": f"{Color.GREEN}ls{Color.RESET} -lh", "description": "Formato largo con tamaños legibles", "description_en": "Long format with human-readable sizes"},
48
+ {"command": f"{Color.GREEN}tree{Color.RESET}", "description": "Muestra directorios en forma de árbol", "description_en": "Display directories as a tree"},
49
+ ]
50
+
51
+
52
+ def show(lang: str = "es") -> None:
53
+ title = TITLE_EN if lang == "en" else TITLE
54
+ print_table(title, COMMANDS, lang)
@@ -0,0 +1,34 @@
1
+ from shellcolorize import Color
2
+ from guia_linux.utils import print_table
3
+
4
+ TITLE = "Opciones de SYSTEMCTL"
5
+ TITLE_EN = "SYSTEMCTL Options"
6
+ BRIEF = "Gestión de servicios con systemd"
7
+ BRIEF_EN = "Manage services with systemd"
8
+
9
+ COMMANDS = [
10
+ {"command": f"{Color.GREEN}systemctl{Color.RESET} start service", "description": "Inicia el servicio", "description_en": "Start the service"},
11
+ {"command": f"{Color.GREEN}systemctl{Color.RESET} stop service", "description": "Detiene el servicio", "description_en": "Stop the service"},
12
+ {"command": f"{Color.GREEN}systemctl{Color.RESET} restart service", "description": "Reinicia el servicio", "description_en": "Restart the service"},
13
+ {"command": f"{Color.GREEN}systemctl{Color.RESET} reload service", "description": "Recarga la configuración sin detenerlo", "description_en": "Reload configuration without stopping"},
14
+ {"command": f"{Color.GREEN}systemctl{Color.RESET} enable service", "description": "Habilita el inicio automático al arranque", "description_en": "Enable automatic start at boot"},
15
+ {"command": f"{Color.GREEN}systemctl{Color.RESET} disable service", "description": "Deshabilita el inicio automático al arranque", "description_en": "Disable automatic start at boot"},
16
+ {"command": f"{Color.GREEN}systemctl{Color.RESET} status service", "description": "Muestra el estado actual del servicio", "description_en": "Show current service status"},
17
+ {"command": f"{Color.GREEN}systemctl{Color.RESET} is-active service", "description": "Verifica si el servicio está activo", "description_en": "Check if the service is active"},
18
+ {"command": f"{Color.GREEN}systemctl{Color.RESET} is-enabled service", "description": "Verifica si el servicio está habilitado", "description_en": "Check if the service is enabled"},
19
+ {"command": f"{Color.GREEN}systemctl{Color.RESET} list-units --type=service", "description": "Lista todos los servicios activos", "description_en": "List all active services"},
20
+ {"command": f"{Color.GREEN}systemctl{Color.RESET} list-unit-files --type=service", "description": "Lista todos los archivos de unidad de servicios", "description_en": "List all service unit files"},
21
+ {"command": f"{Color.GREEN}systemctl{Color.RESET} daemon-reload", "description": "Recarga el gestor systemd tras cambios en archivos", "description_en": "Reload systemd after unit file changes"},
22
+ {"command": f"{Color.GREEN}systemctl{Color.RESET} mask service", "description": "Enmascara el servicio para evitar que se inicie", "description_en": "Mask service to prevent it from starting"},
23
+ {"command": f"{Color.GREEN}systemctl{Color.RESET} unmask service", "description": "Desenmascara un servicio bloqueado", "description_en": "Unmask a previously masked service"},
24
+ {"command": f"{Color.GREEN}systemctl{Color.RESET} show service", "description": "Muestra los detalles de configuración del servicio", "description_en": "Show service configuration details"},
25
+ {"command": f"{Color.GREEN}systemctl{Color.RESET} cat service", "description": "Muestra el archivo de unidad del servicio", "description_en": "Show the service unit file"},
26
+ {"command": f"{Color.GREEN}systemctl{Color.RESET} edit service", "description": "Edita el archivo de unidad del servicio", "description_en": "Edit the service unit file"},
27
+ {"command": f"{Color.GREEN}systemctl{Color.RESET} isolate multi-user.target", "description": "Cambia al modo multiusuario (sin GUI)", "description_en": "Switch to multi-user mode (no GUI)"},
28
+ {"command": f"{Color.GREEN}systemctl{Color.RESET} isolate graphical.target", "description": "Cambia al modo gráfico", "description_en": "Switch to graphical mode"},
29
+ ]
30
+
31
+
32
+ def show(lang: str = "es") -> None:
33
+ title = TITLE_EN if lang == "en" else TITLE
34
+ print_table(title, COMMANDS, lang)
@@ -0,0 +1,25 @@
1
+ from shellcolorize import Color
2
+ from guia_linux.utils import print_table
3
+
4
+ TITLE = "Opciones de TAIL"
5
+ TITLE_EN = "TAIL Options"
6
+ BRIEF = "Muestra el final de un archivo"
7
+ BRIEF_EN = "Display the end of a file"
8
+
9
+ COMMANDS = [
10
+ {"command": f"{Color.GREEN}tail{Color.RESET} filename", "description": "Muestra las últimas 10 líneas del archivo", "description_en": "Show the last 10 lines of the file"},
11
+ {"command": f"{Color.GREEN}tail{Color.RESET} -n N filename", "description": "Muestra las últimas N líneas", "description_en": "Show the last N lines"},
12
+ {"command": f"{Color.GREEN}tail{Color.RESET} -c N filename", "description": "Muestra los últimos N bytes", "description_en": "Show the last N bytes"},
13
+ {"command": f"{Color.GREEN}tail{Color.RESET} -f filename", "description": "Sigue el archivo en tiempo real", "description_en": "Follow the file in real time"},
14
+ {"command": f"{Color.GREEN}tail{Color.RESET} -F filename", "description": "Sigue el archivo, reconectándose si cambia de nombre", "description_en": "Follow file, reconnecting if renamed"},
15
+ {"command": f"{Color.GREEN}tail{Color.RESET} --follow=descriptor filename", "description": "Sigue por descriptor de archivo", "description_en": "Follow by file descriptor"},
16
+ {"command": f"{Color.GREEN}tail{Color.RESET} --pid=PID filename", "description": "Sigue hasta que el proceso PID finalice", "description_en": "Follow until process PID exits"},
17
+ {"command": f"{Color.GREEN}tail{Color.RESET} --retry -f filename", "description": "Sigue intentando acceder si el archivo no existe", "description_en": "Keep retrying if file is not accessible"},
18
+ {"command": f"{Color.GREEN}tail{Color.RESET} -q file1 file2", "description": "Suprime los encabezados en la salida", "description_en": "Suppress file headers in output"},
19
+ {"command": f"{Color.GREEN}tail{Color.RESET} -v filename", "description": "Muestra siempre el encabezado del archivo", "description_en": "Always show file header"},
20
+ ]
21
+
22
+
23
+ def show(lang: str = "es") -> None:
24
+ title = TITLE_EN if lang == "en" else TITLE
25
+ print_table(title, COMMANDS, lang)
@@ -0,0 +1,27 @@
1
+ from shellcolorize import Color
2
+ from guia_linux.utils import print_table
3
+
4
+ TITLE = "Opciones de TAR"
5
+ TITLE_EN = "TAR Options"
6
+ BRIEF = "Empaquetado y compresión de archivos"
7
+ BRIEF_EN = "File archiving and compression"
8
+
9
+ COMMANDS = [
10
+ {"command": f"{Color.GREEN}tar{Color.RESET} -czf archive.tar.gz dir/", "description": "Crea un archivo .tar.gz comprimido con gzip", "description_en": "Create a gzip-compressed .tar.gz archive"},
11
+ {"command": f"{Color.GREEN}tar{Color.RESET} -cjf archive.tar.bz2 dir/", "description": "Crea un archivo .tar.bz2 comprimido con bzip2", "description_en": "Create a bzip2-compressed .tar.bz2 archive"},
12
+ {"command": f"{Color.GREEN}tar{Color.RESET} -cJf archive.tar.xz dir/", "description": "Crea un archivo .tar.xz comprimido con xz", "description_en": "Create an xz-compressed .tar.xz archive"},
13
+ {"command": f"{Color.GREEN}tar{Color.RESET} -cf archive.tar dir/", "description": "Crea un archivo tar sin compresión", "description_en": "Create a tar archive without compression"},
14
+ {"command": f"{Color.GREEN}tar{Color.RESET} -xzf archive.tar.gz", "description": "Extrae un archivo .tar.gz", "description_en": "Extract a .tar.gz archive"},
15
+ {"command": f"{Color.GREEN}tar{Color.RESET} -xjf archive.tar.bz2", "description": "Extrae un archivo .tar.bz2", "description_en": "Extract a .tar.bz2 archive"},
16
+ {"command": f"{Color.GREEN}tar{Color.RESET} -xJf archive.tar.xz", "description": "Extrae un archivo .tar.xz", "description_en": "Extract a .tar.xz archive"},
17
+ {"command": f"{Color.GREEN}tar{Color.RESET} -xzf archive.tar.gz -C /dest/", "description": "Extrae en el directorio especificado", "description_en": "Extract to the specified directory"},
18
+ {"command": f"{Color.GREEN}tar{Color.RESET} -tzf archive.tar.gz", "description": "Lista el contenido sin extraer", "description_en": "List archive contents without extracting"},
19
+ {"command": f"{Color.GREEN}tar{Color.RESET} -czf archive.tar.gz --exclude='*.log' dir/", "description": "Crea un archivo excluyendo ciertos archivos", "description_en": "Create archive excluding certain files"},
20
+ {"command": f"{Color.GREEN}tar{Color.RESET} -czf archive.tar.gz -C /parent/ subdir/", "description": "Crea un archivo desde un directorio padre", "description_en": "Create archive relative to a parent directory"},
21
+ {"command": f"{Color.GREEN}tar{Color.RESET} --append -f archive.tar file.txt", "description": "Añade un archivo a un tar existente", "description_en": "Append a file to an existing tar archive"},
22
+ ]
23
+
24
+
25
+ def show(lang: str = "es") -> None:
26
+ title = TITLE_EN if lang == "en" else TITLE
27
+ print_table(title, COMMANDS, lang)
@@ -0,0 +1,20 @@
1
+ from shellcolorize import Color
2
+ from guia_linux.utils import print_table
3
+
4
+ TITLE = "Opciones de TEE"
5
+ TITLE_EN = "TEE Options"
6
+ BRIEF = "Lee stdin y escribe en stdout y archivos"
7
+ BRIEF_EN = "Read stdin and write to stdout and files"
8
+
9
+ COMMANDS = [
10
+ {"command": f"{Color.GREEN}ls{Color.RESET} | {Color.GREEN}tee{Color.RESET} output.txt", "description": "Guarda la salida en un archivo y la muestra en pantalla", "description_en": "Save output to file and display on screen"},
11
+ {"command": f"{Color.GREEN}ls{Color.RESET} | {Color.GREEN}tee{Color.RESET} -a output.txt", "description": "Agrega la salida al final del archivo", "description_en": "Append output to file"},
12
+ {"command": f"{Color.GREEN}cmd{Color.RESET} | {Color.GREEN}tee{Color.RESET} /dev/tty output.txt", "description": "Envía la salida tanto a la consola como al archivo", "description_en": "Send output to both console and file"},
13
+ {"command": f"{Color.GREEN}cmd{Color.RESET} | {Color.GREEN}tee{Color.RESET} file1.txt file2.txt", "description": "Escribe la salida en múltiples archivos a la vez", "description_en": "Write output to multiple files at once"},
14
+ {"command": f"{Color.GREEN}cmd{Color.RESET} | {Color.GREEN}tee{Color.RESET} >(other_cmd)", "description": "Redirige la salida a otro comando con sustitución de proceso", "description_en": "Redirect output to another command via process substitution"},
15
+ ]
16
+
17
+
18
+ def show(lang: str = "es") -> None:
19
+ title = TITLE_EN if lang == "en" else TITLE
20
+ print_table(title, COMMANDS, lang)
@@ -0,0 +1,37 @@
1
+ from shellcolorize import Color
2
+ from guia_linux.utils import print_table
3
+
4
+ TITLE = "Opciones de TMUX"
5
+ TITLE_EN = "TMUX Options"
6
+ BRIEF = "Multiplexor de terminal"
7
+ BRIEF_EN = "Terminal multiplexer"
8
+
9
+ COMMANDS = [
10
+ {"section": "Sesiones", "section_en": "Sessions"},
11
+ {"command": f"{Color.GREEN}tmux{Color.RESET}", "description": "Inicia una nueva sesión tmux", "description_en": "Start a new tmux session"},
12
+ {"command": f"{Color.GREEN}tmux{Color.RESET} new -s name", "description": "Crea una nueva sesión con nombre", "description_en": "Create a new named session"},
13
+ {"command": f"{Color.GREEN}tmux{Color.RESET} ls", "description": "Lista las sesiones activas", "description_en": "List active sessions"},
14
+ {"command": f"{Color.GREEN}tmux{Color.RESET} attach -t name", "description": "Se conecta a una sesión existente", "description_en": "Attach to an existing session"},
15
+ {"command": f"{Color.GREEN}tmux{Color.RESET} kill-session -t name", "description": "Cierra una sesión", "description_en": "Kill a session"},
16
+ {"command": f"{Color.GREEN}tmux{Color.RESET} rename-session -t old new", "description": "Renombra una sesión", "description_en": "Rename a session"},
17
+
18
+ {"section": "Atajos de teclado (prefijo: Ctrl+B)", "section_en": "Keyboard Shortcuts (prefix: Ctrl+B)"},
19
+ {"command": f"{Color.GREEN}Ctrl+B d{Color.RESET}", "description": "Desconecta (detach) de la sesión actual", "description_en": "Detach from the current session"},
20
+ {"command": f"{Color.GREEN}Ctrl+B c{Color.RESET}", "description": "Crea una nueva ventana", "description_en": "Create a new window"},
21
+ {"command": f"{Color.GREEN}Ctrl+B n / p{Color.RESET}", "description": "Cambia a la ventana siguiente / anterior", "description_en": "Switch to next / previous window"},
22
+ {"command": f"{Color.GREEN}Ctrl+B N{Color.RESET}", "description": "Cambia a la ventana número N", "description_en": "Switch to window number N"},
23
+ {"command": f"{Color.GREEN}Ctrl+B ,{Color.RESET}", "description": "Renombra la ventana actual", "description_en": "Rename the current window"},
24
+ {"command": f"{Color.GREEN}Ctrl+B &{Color.RESET}", "description": "Cierra la ventana actual", "description_en": "Close the current window"},
25
+ {"command": f"{Color.GREEN}Ctrl+B %{Color.RESET}", "description": "Divide el panel verticalmente", "description_en": "Split pane vertically"},
26
+ {"command": f'{Color.GREEN}Ctrl+B "{Color.RESET}', "description": "Divide el panel horizontalmente", "description_en": "Split pane horizontally"},
27
+ {"command": f"{Color.GREEN}Ctrl+B ←↑→↓{Color.RESET}", "description": "Navega entre paneles", "description_en": "Navigate between panes"},
28
+ {"command": f"{Color.GREEN}Ctrl+B z{Color.RESET}", "description": "Alterna el zoom del panel actual", "description_en": "Toggle zoom on current pane"},
29
+ {"command": f"{Color.GREEN}Ctrl+B x{Color.RESET}", "description": "Cierra el panel actual", "description_en": "Close the current pane"},
30
+ {"command": f"{Color.GREEN}Ctrl+B [{Color.RESET}", "description": "Entra en modo copiar/desplazamiento", "description_en": "Enter copy/scroll mode"},
31
+ {"command": f"{Color.GREEN}Ctrl+B ?{Color.RESET}", "description": "Muestra la lista de atajos de teclado", "description_en": "Show all keyboard shortcuts"},
32
+ ]
33
+
34
+
35
+ def show(lang: str = "es") -> None:
36
+ title = TITLE_EN if lang == "en" else TITLE
37
+ print_table(title, COMMANDS, lang)
@@ -0,0 +1,34 @@
1
+ from shellcolorize import Color
2
+ from guia_linux.utils import print_table
3
+
4
+ TITLE = "Opciones de TOP"
5
+ TITLE_EN = "TOP Options"
6
+ BRIEF = "Monitor de procesos en tiempo real"
7
+ BRIEF_EN = "Real-time process monitor"
8
+
9
+ COMMANDS = [
10
+ {"command": f"{Color.GREEN}top{Color.RESET}", "description": "Inicia top con configuración predeterminada", "description_en": "Start top with default settings"},
11
+ {"command": f"{Color.GREEN}top{Color.RESET} -b", "description": "Modo batch (no interactivo), útil para scripts", "description_en": "Batch mode (non-interactive), useful for scripts"},
12
+ {"command": f"{Color.GREEN}top{Color.RESET} -d N", "description": "Actualiza cada N segundos", "description_en": "Update every N seconds"},
13
+ {"command": f"{Color.GREEN}top{Color.RESET} -n N", "description": "Sale tras N iteraciones", "description_en": "Exit after N iterations"},
14
+ {"command": f"{Color.GREEN}top{Color.RESET} -p pid1,pid2", "description": "Muestra solo los PIDs especificados", "description_en": "Monitor only the specified PIDs"},
15
+ {"command": f"{Color.GREEN}top{Color.RESET} -u user", "description": "Muestra solo procesos del usuario indicado", "description_en": "Show only processes of the given user"},
16
+ {"command": f"{Color.GREEN}top{Color.RESET} -i", "description": "Omite los procesos inactivos", "description_en": "Omit idle processes"},
17
+ {"command": f"{Color.GREEN}top{Color.RESET} -c", "description": "Muestra la línea completa de comando", "description_en": "Show full command line"},
18
+ {"command": f"{Color.GREEN}top{Color.RESET} -o %CPU", "description": "Ordena por la columna especificada", "description_en": "Sort by the specified column"},
19
+ {"command": f"{Color.GREEN}top{Color.RESET} -H", "description": "Muestra cada hilo por separado", "description_en": "Show individual threads"},
20
+ {"command": f"{Color.GREEN}top{Color.RESET} -1", "description": "Muestra cada CPU por separado", "description_en": "Show each CPU individually"},
21
+ {"section": "Teclas interactivas", "section_en": "Interactive Keys"},
22
+ {"command": f"{Color.GREEN}q{Color.RESET}", "description": "Salir de top", "description_en": "Quit top"},
23
+ {"command": f"{Color.GREEN}M{Color.RESET}", "description": "Ordenar por uso de memoria", "description_en": "Sort by memory usage"},
24
+ {"command": f"{Color.GREEN}P{Color.RESET}", "description": "Ordenar por uso de CPU", "description_en": "Sort by CPU usage"},
25
+ {"command": f"{Color.GREEN}k{Color.RESET}", "description": "Envía una señal a un proceso", "description_en": "Send a signal to a process"},
26
+ {"command": f"{Color.GREEN}r{Color.RESET}", "description": "Cambia la prioridad (renice) de un proceso", "description_en": "Change process priority (renice)"},
27
+ {"command": f"{Color.GREEN}V{Color.RESET}", "description": "Activa/desactiva la vista en árbol", "description_en": "Toggle tree view"},
28
+ {"command": f"{Color.GREEN}W{Color.RESET}", "description": "Guarda la configuración actual", "description_en": "Save current settings"},
29
+ ]
30
+
31
+
32
+ def show(lang: str = "es") -> None:
33
+ title = TITLE_EN if lang == "en" else TITLE
34
+ print_table(title, COMMANDS, lang)