Commands on linux – How to use it on vps/server – part 3

CD
Gracetime=2 dev=/dev/blank= to empty a rewritable disc contents
/CDROM > CD.ISO creates on disk a CD ISO image file
mkisofs /dev/cdrom | Gzip > cd_iso.gz create a compressed on disk CD ISO image file
Create a directory of ISO image file
Dev=/dev/cdrom CD.ISO burn an ISO image file
gzip -dc cd_iso.gz | Cdrecord dev=/dev/cdrom-burn a compressed ISO image file
Loop CD./ISO to mount an ISO image file
CD-from one CD CD audio track to WAV file
CD-paranoia-the “-3” from one CD CD audio track to a wav file (parameter 3)
Cdrecord–scanbus scan bus to identify the SCSI channel
dd if=/dev/hdc | Md5sum the md5sum check a device code, such as a piece of CD

Back to top index ^

Network (Ethernet and WIFI wireless)
Ifconfig eth0 shows the configuration of an Ethernet card
Ifup eth0 enable a ‘eth0’ network device
Ifdown eth0 disable a ‘eth0’ network device
Ifconfig eth0 192.168.1.1 netmask 255.255.255.0 control IP address
Ifconfig eth0 promisc set ‘eth0’ into promiscuous mode sniffing packets (sniffing)
Dhclient eth0 DHCP mode enabled ‘eth0’
route -n show routing table
route add -net 0/0 gw IP_Gateway configura default gateway
route add -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.1.1 configure static route to reach network ‘192.168.0.0/16’
route del 0/0 gw IP_gateway remove static route
echo “1” > /proc/sys/net/ipv4/ip_forward activate ip routing
hostname show hostname of system
host www.example.com lookup hostname to resolve name to ip address and viceversa(1)
nslookup www.example.com lookup hostname to resolve name to ip address and viceversa(2)
ip link show show link status of all interfaces
mii-tool eth0 show link status of ‘eth0’
ethtool eth0 show statistics of network card ‘eth0’
netstat -tup show all active network connections and their PID
netstat -tupl show all network services listening on the system and their PID
tcpdump tcp port 80 show all HTTP traffic
iwlist scan show wireless networks
iwconfig eth1 show configuration of a wireless network card
hostname show hostname
host www.example.com lookup hostname to resolve name to ip address and viceversa
nslookup www.example.com lookup hostname to resolve name to ip address and viceversa
whois www.example.com lookup on Whois database

GO TOP INDEX ^
Microsoft Windows networks (SAMBA)
nbtscan ip_addr netbios name resolution
nmblookup -A ip_addr netbios name resolution
smbclient -L ip_addr/hostname show remote shares of a windows host
smbget -Rr smb://ip_addr/share like wget can download files from a host windows via smb

mount -t smbfs -o username=user,password=pass //WinClient/share /mnt/share mount a windows network share

Leave a Reply

Your email address will not be published. Required fields are marked *