Skip to content

Instantly share code, notes, and snippets.

@germs12
Last active December 14, 2015 16:49
Show Gist options
  • Save germs12/5117741 to your computer and use it in GitHub Desktop.
Save germs12/5117741 to your computer and use it in GitHub Desktop.
Linux 101
Network Info
------------
# https://help.ubuntu.com/12.10/serverguide/network-configuration.html
# http://www.cyberciti.biz/faq/howto-setup-linux-lan-card-find-out-full-duplex-half-speed-or-mode/
ethtool <ethernet interface>
Show Network Interfaces
-----------------------
$ ip link show
Network Interfaces (wifi settings, ethernet settings, etc)
----------------------------------------------------------
$ sudo cp /etc/network/interfaces /etc/network/interfaces.backup
$ sudo nano /etc/network/interfaces
After editing you can refresh the system with...
------------------------------------------------
$ sudo /etc/init.d/networking status
Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g. service networking status
Some default Settings for my comp...
------------------------------------
# /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
# Static IP Address
# p4p1 == eth0 on my server
auto p4p1
iface p4p1 inet static
address 192.168.1.7
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
# Wifi network interface
auto wlan0
iface wlan0 inet dhcp
wpa-ssid NETGEAR62
wpa-psk zanysquirrel780
Auto-Mounting media drives
--------------------------
# /etc/fstab
# Add this line to the /etc/fstab file and execute
# `sudo mount -a` to mount. This is automatically run during boot up
# /etc/fstab: static file system information.
# / was on /dev/sda1 during manual edit
UUID=ed27e588-61db-47a6-a831-7e21e0ca1d3c /mnt/media1 ext4 errors=remount-ro 0 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment