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/20 22:35] – gman | general_cli [2020/09/11 18:00] (current) – [check deb] gman | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
- | [[general_configs# | ||
- | ===== see IP info ===== | + | ===== check deb ===== |
- | Pick one, they basically do the same thing: | + | ** Change: "check distro" |
- | < | + | |
- | | + | |
- | | + | |
- | ip a | + | |
- | ip a show | + | |
- | ip a show eth0 | + | |
- | </ | + | |
- | ===== manual up/down ===== | + | Check which Debian install you have: |
+ | < | ||
- | Manually bringing your network up and down ([[https:// | + | ===== echo vs. printf ===== |
- | * Assuming eth0 (change for whichever interface you want to manipulate). | + | |
- | **Generic Method:** | ||
< | < | ||
- | ifdown eth0 # Turn off eth0 | + | echo $var # is the same as... |
- | ifup eth0 # Turn on eth0 | + | printf ' |
- | </ | + | |
- | Use a specific configuration file: | + | echo -n $var |
- | + | printf ' | |
- | < | + | |
- | ifdown wlan0 | + | |
- | ifup --interfaces / | + | |
</ | </ | ||
- | **Debian Method** (as root): | + | ---- |
- | < | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | systemctl restart networking | + | ===== find ===== |
- | systemctl status network | + | |
- | </ | + | |
- | ===== ifupdown vs. ifconfig ===== | + | Basic Syntax: |
- | **Debian, overview: | + | < |
- | * '' | + | |
- | * '' | + | |
- | **The** '' | + | If you get a bunch of garbage |
- | * The '' | + | |
- | * Example: bring up the network with '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | **The** '' | + | < |
- | * An '' | + | |
- | * An '' | + | |
- | ===== ip command ===== | + | ---- |
- | **Usage of the** '' | + | ===== tar ===== |
- | * 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/ | + | tar xvzf filename |
- | ip link set eth0 up | + | |
- | ip route add default via 192.168.0.1 | + | |
- | </ | + | |
- | **Note on Persistence: | + | # x - extract |
- | * '' | + | # v - verbose |
- | + | # z - zip / gnuzip | |
- | < | + | # f - file (name follows) |
- | / | + | |
- | / | + | |
- | / | + | |
</ | </ | ||
---- | ---- | ||
+ | |||
general_cli.1587422144.txt.gz · Last modified: by gman