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:18] – 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 ===== | ||
< | < | ||
- | echo $var # is the same as... | + | echo $var |
printf ' | printf ' | ||
- | echo -n $var # is the same as... | + | echo -n $var # is the same as... |
printf ' | printf ' | ||
</ | </ | ||
- | ====== find ====== | + | ---- |
+ | |||
+ | ===== find ===== | ||
Basic Syntax: | Basic Syntax: | ||
Line 19: | Line 31: | ||
< | < | ||
- | ====== Network Commands ====== | + | ---- |
- | [[general_configs# | + | ===== tar ===== |
- | ===== see IP info ===== | ||
- | |||
- | Pick one, they basically do the same thing: | ||
< | < | ||
- | | + | tar xvzf filename |
- | ls / | + | |
- | ip a | + | |
- | ip a show | + | |
- | ip a show eth0 | + | |
- | </ | + | |
- | ===== manual up/down ===== | + | # x - extract |
- | + | # v - verbose | |
- | Manually bringing your network up and down ([[https:// | + | # z - zip / gnuzip |
- | * Assuming eth0 (change for whichever interface you want to manipulate). | + | # f - file (name follows) |
- | + | ||
- | **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: | ||
- | * '' | ||
- | |||
- | < | ||
- | / | ||
- | / | ||
- | / | ||
- | </ | ||
- | |||
- | ---- | ||
general_cli.1587813495.txt.gz · Last modified: by gman