Wednesday, November 30, 2011

Useful Linux Network Commands for Ubuntu / Debian

Ubuntu Linux Useful Networking commands

    ifconfig – displays information network
    iwconfig – displays information from wireless
    sudo /etc/init.d/networking restart – reset the network
    /etc/network/interfaces –
(file) manual configuration
    ifup interface – bring online interface
    ifdown interface – disable interface 


iwlist scan - shows wireless networks that are available in the area with basic encryption information
lshw -C network - Shows Details of Interface card and drivers of each networking device

lspci -nn - Shows PCI vendor and device codes as both numbers and names of hardware connected to the pci bus
lsusb - Shows USB connected hardware
lshw -C usb - Additional info on USB related hardware (good for USB dongles)

route -n - Lists kernel IP routing table — Good for troubleshooting problems with the gateway
sudo dhclient - Request IP address from DHCP server for specified interface
sudo dhclient -r - Release IP address associated with specified interface
/etc/udev/rules.d/70-persistent-net.rules - (File) which assigns logical names (eth0, wlan0, etc) to MAC addresses
cat /etc/resolv.conf - Lists DNS servers associated with network connections


Thursday, November 3, 2011

How to Resize FAT Filesytem using Ubuntu LInux Utility : Fatresize

Fatresize is a command line tool for  resizing  MS Windows FAT16 / FAT32 file systems.
Fatresize Installation:

$ sudo apt-get install fatresize
Using Fatresize:
Fatresize follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below.
-h --help: Show summary of options.
-s --size: Re-size volume to SIZE[k|M|G|ki|Mi|Gi] bytes
-i --info: Show volume information
-p --progress: Show progress
-q --quite: Be quite
-v --verbose: Verbose (not version)

Fatresize Examples:
fatresize -s 2G /dev/evms/hdb2
fatresize -q -s 3G /dev/hde6
fatresize -i /dev/hdg3