mirror of
https://github.com/cheat/cheat.git
synced 2024-11-18 01:40:39 +01:00
7afb33aee4
* Update a mistake in ifconfig * Add example for a SOCKS proxy in ssh * Add an example for mounting a NFS dir in mount * Add a description for git blame * Add some examples in grep * Add example for specifing an interface in dhclient * Add a description for apt-get install * Add some commands in apt-cache * Add an example of pretty printing jsons using python
14 lines
375 B
Text
14 lines
375 B
Text
# Display network settings of the first ethernet adapter
|
|
ifconfig wlan0
|
|
|
|
# Display all interfaces, even if down
|
|
ifconfig -a
|
|
|
|
# Take down / up the wireless adapter
|
|
ifconfig wlan0 {up|down}
|
|
|
|
# Set a static IP and netmask
|
|
ifconfig eth0 192.168.1.100 netmask 255.255.255.0
|
|
|
|
# You may also need to add a gateway IP
|
|
route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1
|