general_cli
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
general_cli [2020/04/25 11:20] – gman | general_cli [2020/09/11 18:00] (current) – [check deb] gman | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== echo vs. printf | + | ====== CLI ====== |
+ | |||
+ | |||
+ | ===== check deb ===== | ||
+ | |||
+ | ** Change: "check distro" | ||
+ | |||
+ | Check which Debian install you have: | ||
+ | < | ||
+ | |||
+ | ===== echo vs. printf ===== | ||
< | < | ||
Line 11: | Line 21: | ||
---- | ---- | ||
- | ====== find ====== | + | ===== find ===== |
Basic Syntax: | Basic Syntax: | ||
Line 23: | Line 33: | ||
---- | ---- | ||
- | ====== Network Commands ====== | + | ===== tar ===== |
- | + | ||
- | [[general_configs# | + | |
- | + | ||
- | ===== see IP info ===== | + | |
- | + | ||
- | Pick one, they basically do the same thing: | + | |
- | < | + | |
- | | + | |
- | ls / | + | |
- | ip a | + | |
- | ip a show | + | |
- | ip a show eth0 | + | |
- | </ | + | |
- | + | ||
- | ===== manual up/down ===== | + | |
- | + | ||
- | Manually bringing your network up and down ([[https:// | + | |
- | * Assuming eth0 (change for whichever interface you want to manipulate). | + | |
- | + | ||
- | **Generic Method:** | + | |
- | < | + | |
- | ifdown eth0 # Turn off eth0 | + | |
- | ifup eth0 # Turn on eth0 | + | |
- | </ | + | |
- | + | ||
- | Use a specific configuration file: | + | |
- | + | ||
- | < | + | |
- | ifdown wlan0 # bring interface down | + | |
- | ifup --interfaces / | + | |
- | </ | + | |
- | + | ||
- | **Debian Method** (as root): | + | |
- | < | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | + | ||
- | systemctl restart networking | + | |
- | systemctl status network | + | |
- | </ | + | |
- | + | ||
- | ===== ifupdown vs. ifconfig ===== | + | |
- | + | ||
- | **Debian, overview: | + | |
- | * '' | + | |
- | * '' | + | |
- | + | ||
- | **The** '' | + | |
- | * The '' | + | |
- | * Example: bring up the network with '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | + | ||
- | **The** '' | + | |
- | * An '' | + | |
- | * An '' | + | |
- | + | ||
- | ===== ip command ===== | + | |
- | + | ||
- | **Usage of the** '' | + | |
- | * If your distro did not install ifconfig, you can install it in Debian with '' | + | |
- | * Or you can use the horridly ugly syntax for '' | + | |
- | * From the following example you will need to replace the IP and the interface with your own. | + | |
- | + | ||
- | **[1] Assign an IP address to a specific interface: | + | |
- | < | + | |
- | + | ||
- | **[2] Bring up the interface link** (do NOT skip this step or you will get a " | + | |
- | < | + | |
- | + | ||
- | **[3] Bring up the interface link:** | + | |
- | < | + | |
- | + | ||
- | **[1-3] All in one place... looks like this:** | + | |
- | < | + | |
- | ip addr add 192.168.0.100/ | + | |
- | ip link set eth0 up | + | |
- | ip route add default via 192.168.0.1 | + | |
- | </ | + | |
- | + | ||
- | **Note on Persistence: | + | |
- | * '' | + | |
- | + | ||
- | < | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | </ | + | |
- | + | ||
- | ---- | + | |
- | + | ||
- | ====== tar ====== | + | |
< | < | ||
Line 127: | Line 43: | ||
# f - file (name follows) | # f - file (name follows) | ||
</ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ |
general_cli.1587813607.txt.gz · Last modified: by gman