linux-commands-guide 2.0.1__tar.gz → 2.1.1__tar.gz
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.
- linux_commands_guide-2.1.1/LICENSE +21 -0
- linux_commands_guide-2.1.1/PKG-INFO +212 -0
- linux_commands_guide-2.1.1/README.md +185 -0
- linux_commands_guide-2.1.1/guia_linux/__init__.py +5 -0
- linux_commands_guide-2.1.1/guia_linux/__main__.py +3 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/cli.py +35 -9
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/cat.py +5 -5
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/chown.py +1 -1
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/ifconfig.py +1 -1
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/iptables.py +1 -1
- linux_commands_guide-2.1.1/guia_linux/tools/lxc.py +33 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/nc.py +2 -2
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/regex.py +5 -5
- linux_commands_guide-2.1.1/guia_linux/tools/rsync.py +27 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/tmux.py +2 -2
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/xargs.py +1 -1
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/utils.py +7 -5
- linux_commands_guide-2.1.1/linux_commands_guide.egg-info/PKG-INFO +212 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/linux_commands_guide.egg-info/SOURCES.txt +4 -1
- linux_commands_guide-2.1.1/linux_commands_guide.egg-info/entry_points.txt +2 -0
- linux_commands_guide-2.1.1/linux_commands_guide.egg-info/requires.txt +5 -0
- linux_commands_guide-2.1.1/pyproject.toml +51 -0
- linux_commands_guide-2.1.1/tests/test_guide.py +83 -0
- linux_commands_guide-2.0.1/PKG-INFO +0 -147
- linux_commands_guide-2.0.1/README.md +0 -130
- linux_commands_guide-2.0.1/guia_linux/__init__.py +0 -4
- linux_commands_guide-2.0.1/guia_linux/tools/lxc.py +0 -24
- linux_commands_guide-2.0.1/guia_linux/tools/rsync.py +0 -27
- linux_commands_guide-2.0.1/linux_commands_guide.egg-info/PKG-INFO +0 -147
- linux_commands_guide-2.0.1/linux_commands_guide.egg-info/entry_points.txt +0 -2
- linux_commands_guide-2.0.1/linux_commands_guide.egg-info/requires.txt +0 -1
- linux_commands_guide-2.0.1/pyproject.toml +0 -31
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/__init__.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/awk.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/chmod.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/crontab.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/curl.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/cut.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/df.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/docker.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/du.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/file_descriptors.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/find.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/firewall_cmd.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/free.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/git.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/grep.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/head.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/htop.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/ip.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/jq.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/logs.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/lsblk.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/lsof.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/netstat.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/nmap.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/ps.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/scp.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/sed.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/shortcuts.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/sort.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/ss.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/ssh.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/system.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/systemctl.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/tail.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/tar.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/tee.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/top.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/tr.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/uname.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/uniq.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/vim.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/guia_linux/tools/watch.py +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/linux_commands_guide.egg-info/dependency_links.txt +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/linux_commands_guide.egg-info/top_level.txt +0 -0
- {linux_commands_guide-2.0.1 → linux_commands_guide-2.1.1}/setup.cfg +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Sergio Berruetta
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: linux-commands-guide
|
|
3
|
+
Version: 2.1.1
|
|
4
|
+
Summary: Bilingual ES/EN interactive Linux command reference — 50+ tools with keyword search
|
|
5
|
+
Author: Sergio Berruetta
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/serber-info/linux-commands-guide
|
|
8
|
+
Project-URL: Bug Tracker, https://github.com/serber-info/linux-commands-guide/issues
|
|
9
|
+
Project-URL: Source Code, https://github.com/serber-info/linux-commands-guide
|
|
10
|
+
Project-URL: Changelog, https://github.com/serber-info/linux-commands-guide/blob/main/CHANGELOG.md
|
|
11
|
+
Keywords: linux,cheatsheet,commands,reference,sysadmin,bilingual,cli
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: System Administrators
|
|
16
|
+
Classifier: Natural Language :: English
|
|
17
|
+
Classifier: Natural Language :: Spanish
|
|
18
|
+
Classifier: Topic :: System :: Systems Administration
|
|
19
|
+
Requires-Python: >=3.9
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: shellcolorize>=1.1.0
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: pytest>=7; extra == "dev"
|
|
25
|
+
Requires-Dist: ruff>=0.4; extra == "dev"
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
|
|
28
|
+
# linux-commands-guide — `lh`
|
|
29
|
+
|
|
30
|
+
[](https://github.com/serber-info/linux-commands-guide/actions/workflows/ci.yml)
|
|
31
|
+
[](https://badge.fury.io/py/linux-commands-guide)
|
|
32
|
+
[](LICENSE)
|
|
33
|
+
[](https://github.com/serber-info/linux-commands-guide/stargazers)
|
|
34
|
+
|
|
35
|
+
**Bilingual ES/EN Linux command reference for the terminal.** 51 tools covered, keyword search across all of
|
|
36
|
+
them, one short command: `lh`. Like a cheat sheet that is always one keystroke away — and works over SSH.
|
|
37
|
+
|
|
38
|
+
*Guía de comandos Linux bilingüe (español / inglés) para la terminal.*
|
|
39
|
+
|
|
40
|
+
<p align="center">
|
|
41
|
+
<img src="https://raw.githubusercontent.com/serber-info/linux-commands-guide/main/docs/demo.gif" alt="lh demo: ssh reference, keyword search and Spanish output" width="820">
|
|
42
|
+
</p>
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## ✨ Features
|
|
47
|
+
|
|
48
|
+
- 🌐 **Bilingual** — Spanish or English, picked from your locale (`--lang es|en` to force it)
|
|
49
|
+
- 🔍 **Cross-tool search** — `lh -s port` finds every command mentioning "port", in both languages
|
|
50
|
+
- 📦 **51 tools** — awk, grep, find, git, docker, ssh, tmux, jq, ss, rsync, tar, systemctl, iptables and more
|
|
51
|
+
- ✅ **Checked content** — every entry is tested for both translations; examples are real, working commands
|
|
52
|
+
- 🔇 **Pipe-friendly** — plain text when piped (`lh tar | less`), honours `NO_COLOR`
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 📥 Installation
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
pip install linux-commands-guide
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Or from source:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
git clone https://github.com/serber-info/linux-commands-guide.git
|
|
66
|
+
cd linux-commands-guide
|
|
67
|
+
pip install -e .
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 🛠 Usage
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
lh <tool> # Show commands for a tool
|
|
76
|
+
lh -s <keyword> # Search across all tools
|
|
77
|
+
lh --lang en <tool> # Force English (or --lang es for Spanish)
|
|
78
|
+
lh --help # Help and the full tool list
|
|
79
|
+
lh --version
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Examples
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
lh ssh
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
╔══════════════════════════════════════════════╗
|
|
90
|
+
║ SSH Options ║
|
|
91
|
+
╚══════════════════════════════════════════════╝
|
|
92
|
+
|
|
93
|
+
Command Description
|
|
94
|
+
──────────────────────────────────────────────────────────────────────────────────────────────
|
|
95
|
+
ssh user@host Connect to host as the given user
|
|
96
|
+
ssh -p <port> user@host Connect using the specified port
|
|
97
|
+
ssh -i key.pem user@host Use a private key for authentication
|
|
98
|
+
ssh -L 8080:localhost:80 user@host Local tunnel: forward local port 8080 to host port 80
|
|
99
|
+
ssh -R 9090:localhost:8080 user@host Remote tunnel: forward host port 9090 to local port 8080
|
|
100
|
+
…
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
lh -s port
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
╔══════════════════════════════════════════════════╗
|
|
109
|
+
║ Search: port ║
|
|
110
|
+
╚══════════════════════════════════════════════════╝
|
|
111
|
+
|
|
112
|
+
34 results
|
|
113
|
+
|
|
114
|
+
▶ docker
|
|
115
|
+
docker run -p 8080:80 image_name
|
|
116
|
+
Map host port to container port
|
|
117
|
+
▶ firewall-cmd
|
|
118
|
+
firewall-cmd --zone=zone --add-port=80/tcp --permanent
|
|
119
|
+
Permanently open TCP port 80
|
|
120
|
+
firewall-cmd --zone=zone --remove-port=80/tcp --permanent
|
|
121
|
+
…
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## 🔧 Available Tools
|
|
127
|
+
|
|
128
|
+
| Tool | Description |
|
|
129
|
+
|------|-------------|
|
|
130
|
+
| `awk` | Column-based text processing |
|
|
131
|
+
| `cat` | Display and concatenate file contents |
|
|
132
|
+
| `chmod` | Change file permissions |
|
|
133
|
+
| `chown` | Change file owner and group |
|
|
134
|
+
| `crontab` | Periodic task scheduling |
|
|
135
|
+
| `curl` | Transfer data with URLs |
|
|
136
|
+
| `cut` | Extract sections from each line |
|
|
137
|
+
| `df` | Display disk space usage |
|
|
138
|
+
| `docker` | Docker container management |
|
|
139
|
+
| `du` | Display directory space usage |
|
|
140
|
+
| `descriptors` | File descriptors and redirections |
|
|
141
|
+
| `find` | Search for files and directories |
|
|
142
|
+
| `firewall-cmd` | Manage the firewalld firewall |
|
|
143
|
+
| `free` | Display system memory usage |
|
|
144
|
+
| `git` | Version control with Git |
|
|
145
|
+
| `grep` | Search for patterns in files |
|
|
146
|
+
| `head` | Display the beginning of a file |
|
|
147
|
+
| `htop` | Interactive process monitor |
|
|
148
|
+
| `ifconfig` | Network interface configuration (legacy) |
|
|
149
|
+
| `ip` | Modern network interface and routing management |
|
|
150
|
+
| `iptables` | Kernel firewall rule management |
|
|
151
|
+
| `jq` | Command-line JSON processor |
|
|
152
|
+
| `logs` | Important log file paths in Linux |
|
|
153
|
+
| `lsblk` | List block devices |
|
|
154
|
+
| `lsof` | List open files by processes |
|
|
155
|
+
| `lxc` | LXC container management |
|
|
156
|
+
| `nc` | TCP/IP Swiss army knife |
|
|
157
|
+
| `netstat` | Network connection statistics |
|
|
158
|
+
| `nmap` | Network and port scanner |
|
|
159
|
+
| `ps` | Information about running processes |
|
|
160
|
+
| `regex` | Regular expression patterns |
|
|
161
|
+
| `rsync` | Efficient file synchronization |
|
|
162
|
+
| `scp` | Secure file copy over SSH |
|
|
163
|
+
| `sed` | Stream text editor |
|
|
164
|
+
| `shortcuts` | Terminal keyboard shortcuts |
|
|
165
|
+
| `sort` | Sort lines of text |
|
|
166
|
+
| `ss` | Socket statistics (replaces netstat) |
|
|
167
|
+
| `ssh` | Secure Shell client |
|
|
168
|
+
| `system` | Basic system commands |
|
|
169
|
+
| `systemctl` | Manage services with systemd |
|
|
170
|
+
| `tail` | Display the end of a file |
|
|
171
|
+
| `tar` | File archiving and compression |
|
|
172
|
+
| `tee` | Read stdin and write to stdout and files |
|
|
173
|
+
| `tmux` | Terminal multiplexer |
|
|
174
|
+
| `top` | Real-time process monitor |
|
|
175
|
+
| `tr` | Translate or delete characters |
|
|
176
|
+
| `uname` | System and kernel information |
|
|
177
|
+
| `uniq` | Filter adjacent duplicate lines |
|
|
178
|
+
| `vim` | Modal terminal text editor |
|
|
179
|
+
| `watch` | Execute a command periodically |
|
|
180
|
+
| `xargs` | Build and execute commands from stdin |
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## 🧪 Development
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
pip install -e ".[dev]"
|
|
188
|
+
ruff check .
|
|
189
|
+
pytest
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Each tool is a small module in `guia_linux/tools/` with a `COMMANDS` list. To add one, copy an existing
|
|
193
|
+
module, register it in `guia_linux/tools/__init__.py`, add it to the table above, and run `pytest` —
|
|
194
|
+
the test suite checks that every entry has both translations and that the README lists every tool.
|
|
195
|
+
|
|
196
|
+
See [CHANGELOG.md](CHANGELOG.md) for release notes.
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## 📝 License
|
|
201
|
+
|
|
202
|
+
MIT — see [LICENSE](LICENSE).
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## 💬 Feedback
|
|
207
|
+
|
|
208
|
+
Open an issue or reach out via GitHub.
|
|
209
|
+
|
|
210
|
+
## 🌐 Connect
|
|
211
|
+
|
|
212
|
+
[](https://github.com/serber-info)
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# linux-commands-guide — `lh`
|
|
2
|
+
|
|
3
|
+
[](https://github.com/serber-info/linux-commands-guide/actions/workflows/ci.yml)
|
|
4
|
+
[](https://badge.fury.io/py/linux-commands-guide)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://github.com/serber-info/linux-commands-guide/stargazers)
|
|
7
|
+
|
|
8
|
+
**Bilingual ES/EN Linux command reference for the terminal.** 51 tools covered, keyword search across all of
|
|
9
|
+
them, one short command: `lh`. Like a cheat sheet that is always one keystroke away — and works over SSH.
|
|
10
|
+
|
|
11
|
+
*Guía de comandos Linux bilingüe (español / inglés) para la terminal.*
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<img src="https://raw.githubusercontent.com/serber-info/linux-commands-guide/main/docs/demo.gif" alt="lh demo: ssh reference, keyword search and Spanish output" width="820">
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## ✨ Features
|
|
20
|
+
|
|
21
|
+
- 🌐 **Bilingual** — Spanish or English, picked from your locale (`--lang es|en` to force it)
|
|
22
|
+
- 🔍 **Cross-tool search** — `lh -s port` finds every command mentioning "port", in both languages
|
|
23
|
+
- 📦 **51 tools** — awk, grep, find, git, docker, ssh, tmux, jq, ss, rsync, tar, systemctl, iptables and more
|
|
24
|
+
- ✅ **Checked content** — every entry is tested for both translations; examples are real, working commands
|
|
25
|
+
- 🔇 **Pipe-friendly** — plain text when piped (`lh tar | less`), honours `NO_COLOR`
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 📥 Installation
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pip install linux-commands-guide
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Or from source:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
git clone https://github.com/serber-info/linux-commands-guide.git
|
|
39
|
+
cd linux-commands-guide
|
|
40
|
+
pip install -e .
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## 🛠 Usage
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
lh <tool> # Show commands for a tool
|
|
49
|
+
lh -s <keyword> # Search across all tools
|
|
50
|
+
lh --lang en <tool> # Force English (or --lang es for Spanish)
|
|
51
|
+
lh --help # Help and the full tool list
|
|
52
|
+
lh --version
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Examples
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
lh ssh
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
╔══════════════════════════════════════════════╗
|
|
63
|
+
║ SSH Options ║
|
|
64
|
+
╚══════════════════════════════════════════════╝
|
|
65
|
+
|
|
66
|
+
Command Description
|
|
67
|
+
──────────────────────────────────────────────────────────────────────────────────────────────
|
|
68
|
+
ssh user@host Connect to host as the given user
|
|
69
|
+
ssh -p <port> user@host Connect using the specified port
|
|
70
|
+
ssh -i key.pem user@host Use a private key for authentication
|
|
71
|
+
ssh -L 8080:localhost:80 user@host Local tunnel: forward local port 8080 to host port 80
|
|
72
|
+
ssh -R 9090:localhost:8080 user@host Remote tunnel: forward host port 9090 to local port 8080
|
|
73
|
+
…
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
lh -s port
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
╔══════════════════════════════════════════════════╗
|
|
82
|
+
║ Search: port ║
|
|
83
|
+
╚══════════════════════════════════════════════════╝
|
|
84
|
+
|
|
85
|
+
34 results
|
|
86
|
+
|
|
87
|
+
▶ docker
|
|
88
|
+
docker run -p 8080:80 image_name
|
|
89
|
+
Map host port to container port
|
|
90
|
+
▶ firewall-cmd
|
|
91
|
+
firewall-cmd --zone=zone --add-port=80/tcp --permanent
|
|
92
|
+
Permanently open TCP port 80
|
|
93
|
+
firewall-cmd --zone=zone --remove-port=80/tcp --permanent
|
|
94
|
+
…
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## 🔧 Available Tools
|
|
100
|
+
|
|
101
|
+
| Tool | Description |
|
|
102
|
+
|------|-------------|
|
|
103
|
+
| `awk` | Column-based text processing |
|
|
104
|
+
| `cat` | Display and concatenate file contents |
|
|
105
|
+
| `chmod` | Change file permissions |
|
|
106
|
+
| `chown` | Change file owner and group |
|
|
107
|
+
| `crontab` | Periodic task scheduling |
|
|
108
|
+
| `curl` | Transfer data with URLs |
|
|
109
|
+
| `cut` | Extract sections from each line |
|
|
110
|
+
| `df` | Display disk space usage |
|
|
111
|
+
| `docker` | Docker container management |
|
|
112
|
+
| `du` | Display directory space usage |
|
|
113
|
+
| `descriptors` | File descriptors and redirections |
|
|
114
|
+
| `find` | Search for files and directories |
|
|
115
|
+
| `firewall-cmd` | Manage the firewalld firewall |
|
|
116
|
+
| `free` | Display system memory usage |
|
|
117
|
+
| `git` | Version control with Git |
|
|
118
|
+
| `grep` | Search for patterns in files |
|
|
119
|
+
| `head` | Display the beginning of a file |
|
|
120
|
+
| `htop` | Interactive process monitor |
|
|
121
|
+
| `ifconfig` | Network interface configuration (legacy) |
|
|
122
|
+
| `ip` | Modern network interface and routing management |
|
|
123
|
+
| `iptables` | Kernel firewall rule management |
|
|
124
|
+
| `jq` | Command-line JSON processor |
|
|
125
|
+
| `logs` | Important log file paths in Linux |
|
|
126
|
+
| `lsblk` | List block devices |
|
|
127
|
+
| `lsof` | List open files by processes |
|
|
128
|
+
| `lxc` | LXC container management |
|
|
129
|
+
| `nc` | TCP/IP Swiss army knife |
|
|
130
|
+
| `netstat` | Network connection statistics |
|
|
131
|
+
| `nmap` | Network and port scanner |
|
|
132
|
+
| `ps` | Information about running processes |
|
|
133
|
+
| `regex` | Regular expression patterns |
|
|
134
|
+
| `rsync` | Efficient file synchronization |
|
|
135
|
+
| `scp` | Secure file copy over SSH |
|
|
136
|
+
| `sed` | Stream text editor |
|
|
137
|
+
| `shortcuts` | Terminal keyboard shortcuts |
|
|
138
|
+
| `sort` | Sort lines of text |
|
|
139
|
+
| `ss` | Socket statistics (replaces netstat) |
|
|
140
|
+
| `ssh` | Secure Shell client |
|
|
141
|
+
| `system` | Basic system commands |
|
|
142
|
+
| `systemctl` | Manage services with systemd |
|
|
143
|
+
| `tail` | Display the end of a file |
|
|
144
|
+
| `tar` | File archiving and compression |
|
|
145
|
+
| `tee` | Read stdin and write to stdout and files |
|
|
146
|
+
| `tmux` | Terminal multiplexer |
|
|
147
|
+
| `top` | Real-time process monitor |
|
|
148
|
+
| `tr` | Translate or delete characters |
|
|
149
|
+
| `uname` | System and kernel information |
|
|
150
|
+
| `uniq` | Filter adjacent duplicate lines |
|
|
151
|
+
| `vim` | Modal terminal text editor |
|
|
152
|
+
| `watch` | Execute a command periodically |
|
|
153
|
+
| `xargs` | Build and execute commands from stdin |
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## 🧪 Development
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
pip install -e ".[dev]"
|
|
161
|
+
ruff check .
|
|
162
|
+
pytest
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Each tool is a small module in `guia_linux/tools/` with a `COMMANDS` list. To add one, copy an existing
|
|
166
|
+
module, register it in `guia_linux/tools/__init__.py`, add it to the table above, and run `pytest` —
|
|
167
|
+
the test suite checks that every entry has both translations and that the README lists every tool.
|
|
168
|
+
|
|
169
|
+
See [CHANGELOG.md](CHANGELOG.md) for release notes.
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## 📝 License
|
|
174
|
+
|
|
175
|
+
MIT — see [LICENSE](LICENSE).
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## 💬 Feedback
|
|
180
|
+
|
|
181
|
+
Open an issue or reach out via GitHub.
|
|
182
|
+
|
|
183
|
+
## 🌐 Connect
|
|
184
|
+
|
|
185
|
+
[](https://github.com/serber-info)
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
import argparse
|
|
3
|
+
import os
|
|
3
4
|
import sys
|
|
4
5
|
from shellcolorize import Color
|
|
6
|
+
from guia_linux import __version__
|
|
5
7
|
from guia_linux.tools import TOOLS
|
|
6
8
|
from guia_linux.utils import search_all, strip_ansi
|
|
7
9
|
|
|
8
10
|
|
|
11
|
+
def default_lang() -> str:
|
|
12
|
+
"""Spanish for es_* locales, English otherwise."""
|
|
13
|
+
for var in ('LC_ALL', 'LC_MESSAGES', 'LANG', 'LANGUAGE'):
|
|
14
|
+
value = os.environ.get(var)
|
|
15
|
+
if value:
|
|
16
|
+
return 'es' if value.lower().startswith('es') else 'en'
|
|
17
|
+
return 'en'
|
|
18
|
+
|
|
19
|
+
|
|
9
20
|
def _help_header(lang: str) -> None:
|
|
10
21
|
title = 'Linux Command Reference' if lang == 'en' else 'Guía de Comandos Linux'
|
|
11
22
|
w = max(46, len(title) + 6)
|
|
@@ -13,7 +24,7 @@ def _help_header(lang: str) -> None:
|
|
|
13
24
|
print()
|
|
14
25
|
print(f" {Color.CYAN}╔{border}╗{Color.RESET}")
|
|
15
26
|
print(f" {Color.CYAN}║{Color.RESET} {Color.BOLD}{Color.CYAN}{title}{Color.RESET}"
|
|
16
|
-
+ ' ' * max(0, w - len(title) -
|
|
27
|
+
+ ' ' * max(0, w - len(title) - 4)
|
|
17
28
|
+ f" {Color.CYAN}║{Color.RESET}")
|
|
18
29
|
print(f" {Color.CYAN}╚{border}╝{Color.RESET}")
|
|
19
30
|
|
|
@@ -28,6 +39,7 @@ def _print_help(lang: str) -> None:
|
|
|
28
39
|
{Color.GREEN}lh{Color.RESET} <tool> --lang en Force English output
|
|
29
40
|
{Color.GREEN}lh{Color.RESET} -s <keyword> Search across all tools
|
|
30
41
|
{Color.GREEN}lh{Color.RESET} -s <keyword> --lang en Search with English descriptions
|
|
42
|
+
{Color.GREEN}lh{Color.RESET} --version Show version
|
|
31
43
|
|
|
32
44
|
{Color.BOLD}Examples{Color.RESET}
|
|
33
45
|
{Color.GREEN}lh grep{Color.RESET} All grep options
|
|
@@ -41,6 +53,7 @@ def _print_help(lang: str) -> None:
|
|
|
41
53
|
{Color.GREEN}lh{Color.RESET} <herramienta> --lang es Fuerza salida en español
|
|
42
54
|
{Color.GREEN}lh{Color.RESET} -s <término> Busca en todas las herramientas
|
|
43
55
|
{Color.GREEN}lh{Color.RESET} -s <término> --lang en Busca con descripciones en inglés
|
|
56
|
+
{Color.GREEN}lh{Color.RESET} --version Muestra la versión
|
|
44
57
|
|
|
45
58
|
{Color.BOLD}Ejemplos{Color.RESET}
|
|
46
59
|
{Color.GREEN}lh grep{Color.RESET} Todas las opciones de grep
|
|
@@ -71,7 +84,7 @@ def _search(query: str, lang: str) -> None:
|
|
|
71
84
|
print()
|
|
72
85
|
print(f" {Color.CYAN}╔{border}╗{Color.RESET}")
|
|
73
86
|
print(f" {Color.CYAN}║{Color.RESET} {Color.BOLD}{Color.CYAN}{header}{Color.RESET}"
|
|
74
|
-
+ ' ' * max(0, w - len(header) -
|
|
87
|
+
+ ' ' * max(0, w - len(header) - 4)
|
|
75
88
|
+ f" {Color.CYAN}║{Color.RESET}")
|
|
76
89
|
print(f" {Color.CYAN}╚{border}╝{Color.RESET}")
|
|
77
90
|
|
|
@@ -96,15 +109,17 @@ def _search(query: str, lang: str) -> None:
|
|
|
96
109
|
print()
|
|
97
110
|
|
|
98
111
|
|
|
99
|
-
def main() -> None:
|
|
100
|
-
parser = argparse.ArgumentParser(add_help=False)
|
|
112
|
+
def main(argv=None) -> None:
|
|
113
|
+
parser = argparse.ArgumentParser(prog='lh', add_help=False)
|
|
101
114
|
parser.add_argument('tool', nargs='?', default=None)
|
|
102
115
|
parser.add_argument('-s', '--search', metavar='KEYWORD', default=None)
|
|
103
|
-
parser.add_argument('--lang', choices=['es', 'en'], default=
|
|
116
|
+
parser.add_argument('--lang', choices=['es', 'en'], default=None)
|
|
104
117
|
parser.add_argument('-h', '--help', action='store_true')
|
|
105
|
-
|
|
118
|
+
parser.add_argument('-V', '--version', action='version', version=f'lh (linux-commands-guide) {__version__}')
|
|
119
|
+
args = parser.parse_args(argv)
|
|
120
|
+
Color.auto()
|
|
106
121
|
|
|
107
|
-
lang = args.lang
|
|
122
|
+
lang = args.lang or default_lang()
|
|
108
123
|
|
|
109
124
|
if args.help or (args.tool is None and args.search is None):
|
|
110
125
|
_print_help(lang)
|
|
@@ -119,11 +134,22 @@ def main() -> None:
|
|
|
119
134
|
msg = (f"Tool '{args.tool}' not found — run 'lh --help' for the full list."
|
|
120
135
|
if lang == 'en'
|
|
121
136
|
else f"Herramienta '{args.tool}' no encontrada — ejecuta 'lh --help' para ver la lista.")
|
|
122
|
-
print(f"\n {Color.RED}✖ {msg}{Color.RESET}\n")
|
|
137
|
+
print(f"\n {Color.RED}✖ {msg}{Color.RESET}\n", file=sys.stderr)
|
|
123
138
|
sys.exit(1)
|
|
124
139
|
|
|
125
140
|
TOOLS[key].show(lang)
|
|
126
141
|
|
|
127
142
|
|
|
143
|
+
def run() -> None:
|
|
144
|
+
"""Console entry point: like main(), but quiet when the output pipe is closed early (| head)."""
|
|
145
|
+
try:
|
|
146
|
+
main()
|
|
147
|
+
sys.stdout.flush()
|
|
148
|
+
except BrokenPipeError:
|
|
149
|
+
devnull = os.open(os.devnull, os.O_WRONLY)
|
|
150
|
+
os.dup2(devnull, sys.stdout.fileno())
|
|
151
|
+
sys.exit(141)
|
|
152
|
+
|
|
153
|
+
|
|
128
154
|
if __name__ == '__main__':
|
|
129
|
-
|
|
155
|
+
run()
|
|
@@ -16,11 +16,11 @@ COMMANDS = [
|
|
|
16
16
|
{"command": f"{Color.GREEN}cat{Color.RESET} -E filename", "description": "Muestra $ al final de cada línea", "description_en": "Show $ at end of each line"},
|
|
17
17
|
{"command": f"{Color.GREEN}cat{Color.RESET} -v filename", "description": "Muestra caracteres no imprimibles", "description_en": "Show non-printable characters"},
|
|
18
18
|
{"command": f"{Color.GREEN}cat{Color.RESET} -A filename", "description": "Muestra todos los caracteres especiales", "description_en": "Show all special characters"},
|
|
19
|
-
{"command": f"{Color.GREEN}
|
|
20
|
-
{"command": f"{Color.GREEN}
|
|
21
|
-
{"command": f"{Color.GREEN}
|
|
22
|
-
{"command": f"{Color.GREEN}cat{Color.RESET} -u
|
|
23
|
-
{"command": f"{Color.GREEN}
|
|
19
|
+
{"command": f"{Color.GREEN}bat{Color.RESET} -r N:M filename", "description": "Muestra solo las líneas N a M (bat/batcat)", "description_en": "Show only lines N to M (bat/batcat)"},
|
|
20
|
+
{"command": f"{Color.GREEN}bat{Color.RESET} --theme=<theme> filename", "description": "Resalta la sintaxis con el tema indicado (bat)", "description_en": "Highlight syntax with the given theme (bat)"},
|
|
21
|
+
{"command": f"{Color.GREEN}bat{Color.RESET} --paging=never filename", "description": "Muestra el archivo sin paginador (bat)", "description_en": "Print the file without a pager (bat)"},
|
|
22
|
+
{"command": f"{Color.GREEN}cat{Color.RESET} -u filename", "description": "Ignorada por GNU cat (se mantiene por compatibilidad POSIX)", "description_en": "Ignored by GNU cat (kept for POSIX compatibility)"},
|
|
23
|
+
{"command": f"{Color.GREEN}bat{Color.RESET} --list-languages", "description": "Lista los lenguajes con resaltado de sintaxis (bat)", "description_en": "List languages with syntax highlighting (bat)"},
|
|
24
24
|
]
|
|
25
25
|
|
|
26
26
|
|
|
@@ -12,7 +12,7 @@ COMMANDS = [
|
|
|
12
12
|
{"command": f"{Color.GREEN}chown{Color.RESET} :group filename", "description": "Cambia solo el grupo", "description_en": "Change group only"},
|
|
13
13
|
{"command": f"{Color.GREEN}chown{Color.RESET} -R user directory", "description": "Cambia propietario recursivamente", "description_en": "Change owner recursively"},
|
|
14
14
|
{"command": f"{Color.GREEN}chown{Color.RESET} -R user:group directory", "description": "Cambia propietario y grupo recursivamente", "description_en": "Change owner and group recursively"},
|
|
15
|
-
{"command": f"{Color.GREEN}chown{Color.RESET} --from=old_user
|
|
15
|
+
{"command": f"{Color.GREEN}chown{Color.RESET} --from=old_user new_user filename", "description": "Cambia a new_user solo si el propietario actual es old_user", "description_en": "Change owner to new_user only if the current owner is old_user"},
|
|
16
16
|
{"command": f"{Color.GREEN}chown{Color.RESET} --reference=ref_file filename", "description": "Copia propietario y grupo de otro archivo", "description_en": "Copy owner and group from another file"},
|
|
17
17
|
]
|
|
18
18
|
|
|
@@ -17,7 +17,7 @@ COMMANDS = [
|
|
|
17
17
|
{"command": f"{Color.GREEN}ifconfig{Color.RESET} <iface> promisc", "description": "Activa el modo promiscuo", "description_en": "Enable promiscuous mode"},
|
|
18
18
|
{"command": f"{Color.GREEN}ifconfig{Color.RESET} <iface> -promisc", "description": "Desactiva el modo promiscuo", "description_en": "Disable promiscuous mode"},
|
|
19
19
|
{"command": f"{Color.GREEN}ifconfig{Color.RESET} <iface> hw ether <mac>", "description": "Cambia la dirección MAC", "description_en": "Change the MAC address"},
|
|
20
|
-
{"command": f"{Color.GREEN}ifconfig{Color.RESET} <iface> add <
|
|
20
|
+
{"command": f"{Color.GREEN}ifconfig{Color.RESET} <iface> add <ipv6>/<prefix>", "description": "Añade una dirección IPv6 (en IPv4 se usan alias <iface>:N)", "description_en": "Add an IPv6 address (IPv4 uses <iface>:N aliases)"},
|
|
21
21
|
{"command": f"{Color.GREEN}ifconfig{Color.RESET} <iface> del <ip>", "description": "Elimina una dirección IP secundaria", "description_en": "Remove a secondary IP address"},
|
|
22
22
|
{"command": f"{Color.GREEN}ifconfig{Color.RESET} -a", "description": "Muestra todas las interfaces, activas e inactivas", "description_en": "Show all interfaces, active and inactive"},
|
|
23
23
|
]
|
|
@@ -14,7 +14,7 @@ COMMANDS = [
|
|
|
14
14
|
{"command": f"{Color.GREEN}iptables{Color.RESET} -A INPUT -p tcp --dport 443 -j ACCEPT", "description": "Permite tráfico HTTPS entrante (puerto 443)", "description_en": "Allow incoming HTTPS traffic (port 443)"},
|
|
15
15
|
{"command": f"{Color.GREEN}iptables{Color.RESET} -A OUTPUT -d IP -j DROP", "description": "Bloquea el tráfico saliente hacia una IP", "description_en": "Block outgoing traffic to an IP"},
|
|
16
16
|
{"command": f"{Color.GREEN}iptables{Color.RESET} -A INPUT -p icmp --icmp-type 8 -j ACCEPT", "description": "Permite ping (ICMP tipo 8)", "description_en": "Allow ping (ICMP type 8)"},
|
|
17
|
-
{"command": f"{Color.GREEN}iptables{Color.RESET} -A INPUT -m
|
|
17
|
+
{"command": f"{Color.GREEN}iptables{Color.RESET} -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT", "description": "Permite el tráfico de conexiones ya establecidas", "description_en": "Allow traffic from established connections"},
|
|
18
18
|
{"command": f"{Color.GREEN}iptables{Color.RESET} -P INPUT DROP", "description": "Política por defecto DROP en INPUT", "description_en": "Set default DROP policy for INPUT"},
|
|
19
19
|
{"command": f"{Color.GREEN}iptables{Color.RESET} -P OUTPUT ACCEPT", "description": "Política por defecto ACCEPT en OUTPUT", "description_en": "Set default ACCEPT policy for OUTPUT"},
|
|
20
20
|
{"command": f"{Color.GREEN}iptables{Color.RESET} -D INPUT -s IP -j ACCEPT", "description": "Elimina una regla específica de INPUT", "description_en": "Delete a specific rule from INPUT"},
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
from shellcolorize import Color
|
|
2
|
+
from guia_linux.utils import print_table
|
|
3
|
+
|
|
4
|
+
TITLE = "Opciones de LXC"
|
|
5
|
+
TITLE_EN = "LXC Options"
|
|
6
|
+
BRIEF = "Gestión de contenedores LXC"
|
|
7
|
+
BRIEF_EN = "LXC container management"
|
|
8
|
+
|
|
9
|
+
COMMANDS = [
|
|
10
|
+
{"command": f"{Color.GREEN}lxc-ls{Color.RESET} -f", "description": "Lista los contenedores con estado, IP y tipo", "description_en": "List containers with state, IP and type"},
|
|
11
|
+
{"command": f"{Color.GREEN}lxc-create{Color.RESET} -n name -t download", "description": "Crea un contenedor desde una imagen (asistente interactivo)", "description_en": "Create a container from an image (interactive)"},
|
|
12
|
+
{"command": f"{Color.GREEN}lxc-create{Color.RESET} -n name -t download -- -d debian -r bookworm -a amd64", "description": "Crea un contenedor Debian sin preguntas", "description_en": "Create a Debian container non-interactively"},
|
|
13
|
+
{"command": f"{Color.GREEN}lxc-start{Color.RESET} -n name", "description": "Inicia un contenedor en segundo plano", "description_en": "Start a container in the background"},
|
|
14
|
+
{"command": f"{Color.GREEN}lxc-stop{Color.RESET} -n name", "description": "Detiene un contenedor", "description_en": "Stop a container"},
|
|
15
|
+
{"command": f"{Color.GREEN}lxc-stop{Color.RESET} -n name -r", "description": "Reinicia un contenedor", "description_en": "Reboot a container"},
|
|
16
|
+
{"command": f"{Color.GREEN}lxc-attach{Color.RESET} -n name", "description": "Abre una shell dentro del contenedor", "description_en": "Open a shell inside the container"},
|
|
17
|
+
{"command": f"{Color.GREEN}lxc-attach{Color.RESET} -n name -- command", "description": "Ejecuta un comando dentro del contenedor", "description_en": "Run a command inside the container"},
|
|
18
|
+
{"command": f"{Color.GREEN}lxc-console{Color.RESET} -n name", "description": "Conecta a la consola (salir: Ctrl+A Q)", "description_en": "Attach to the console (exit: Ctrl+A Q)"},
|
|
19
|
+
{"command": f"{Color.GREEN}lxc-info{Color.RESET} -n name", "description": "Muestra estado, PID, IP y uso de recursos", "description_en": "Show state, PID, IP and resource usage"},
|
|
20
|
+
{"command": f"{Color.GREEN}lxc-freeze{Color.RESET} -n name", "description": "Congela todos los procesos del contenedor", "description_en": "Freeze all processes in the container"},
|
|
21
|
+
{"command": f"{Color.GREEN}lxc-unfreeze{Color.RESET} -n name", "description": "Descongela el contenedor", "description_en": "Unfreeze the container"},
|
|
22
|
+
{"command": f"{Color.GREEN}lxc-copy{Color.RESET} -n name -N new_name", "description": "Clona un contenedor", "description_en": "Clone a container"},
|
|
23
|
+
{"command": f"{Color.GREEN}lxc-snapshot{Color.RESET} -n name", "description": "Crea un snapshot (el contenedor debe estar parado)", "description_en": "Create a snapshot (container must be stopped)"},
|
|
24
|
+
{"command": f"{Color.GREEN}lxc-snapshot{Color.RESET} -n name -L", "description": "Lista los snapshots", "description_en": "List snapshots"},
|
|
25
|
+
{"command": f"{Color.GREEN}lxc-destroy{Color.RESET} -n name", "description": "Elimina un contenedor y su sistema de archivos", "description_en": "Delete a container and its filesystem"},
|
|
26
|
+
{"command": f"{Color.GREEN}lxc-config{Color.RESET} lxc.lxcpath", "description": "Muestra dónde se guardan los contenedores", "description_en": "Show where containers are stored"},
|
|
27
|
+
{"command": f"{Color.GREEN}lxc-checkconfig{Color.RESET}", "description": "Comprueba el soporte del kernel para LXC", "description_en": "Check kernel support for LXC"},
|
|
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)
|
|
@@ -7,7 +7,7 @@ BRIEF = "Navaja suiza de TCP/IP"
|
|
|
7
7
|
BRIEF_EN = "TCP/IP Swiss army knife"
|
|
8
8
|
|
|
9
9
|
COMMANDS = [
|
|
10
|
-
{"command": f"{Color.GREEN}nc{Color.RESET} -l -p <port>", "description": "Escucha en el puerto
|
|
10
|
+
{"command": f"{Color.GREEN}nc{Color.RESET} -l -p <port>", "description": "Escucha en el puerto (netcat tradicional; en OpenBSD: nc -l <port>)", "description_en": "Listen on a port (traditional netcat; OpenBSD: nc -l <port>)"},
|
|
11
11
|
{"command": f"{Color.GREEN}nc{Color.RESET} <host> <port>", "description": "Conecta al host y puerto (modo cliente)", "description_en": "Connect to host and port (client mode)"},
|
|
12
12
|
{"command": f"{Color.GREEN}nc{Color.RESET} -z <host> <port>", "description": "Escanea puertos sin enviar datos", "description_en": "Port scan without sending data"},
|
|
13
13
|
{"command": f"{Color.GREEN}nc{Color.RESET} -z <host> 20-80", "description": "Escanea un rango de puertos", "description_en": "Scan a port range"},
|
|
@@ -16,7 +16,7 @@ COMMANDS = [
|
|
|
16
16
|
{"command": f"{Color.GREEN}nc{Color.RESET} -n", "description": "Omite la resolución DNS", "description_en": "Skip DNS resolution"},
|
|
17
17
|
{"command": f"{Color.GREEN}nc{Color.RESET} -k", "description": "Mantiene la conexión abierta tras desconexión", "description_en": "Keep listening after client disconnects"},
|
|
18
18
|
{"command": f"{Color.GREEN}nc{Color.RESET} -w <timeout>", "description": "Tiempo de espera en segundos", "description_en": "Connection timeout in seconds"},
|
|
19
|
-
{"command": f"{Color.GREEN}nc{Color.RESET} -e <command>", "description": "Ejecuta un comando tras la conexión", "description_en": "Execute command after
|
|
19
|
+
{"command": f"{Color.GREEN}nc{Color.RESET} -e <command>", "description": "Ejecuta un comando tras la conexión (solo netcat tradicional/ncat)", "description_en": "Execute a command after connecting (traditional netcat/ncat only)"},
|
|
20
20
|
{"command": f"{Color.GREEN}nc{Color.RESET} -x <proxy>", "description": "Usa un proxy SOCKS para la conexión", "description_en": "Use a SOCKS proxy for the connection"},
|
|
21
21
|
{"command": f"{Color.GREEN}nc{Color.RESET} -q <seconds>", "description": "Espera N segundos tras EOF antes de cerrar", "description_en": "Wait N seconds after EOF before closing"},
|
|
22
22
|
]
|