Skip to content

Instantly share code, notes, and snippets.

@jocker-il
Last active May 29, 2017 13:48
Show Gist options
  • Save jocker-il/d2145dc20556e1873d4c20f66a2772c0 to your computer and use it in GitHub Desktop.
Save jocker-il/d2145dc20556e1873d4c20f66a2772c0 to your computer and use it in GitHub Desktop.
Useful commands for Linux admins
* Finding external IP address fast
wget http://ipinfo.io/ip -qO -
* Test download speed using a file download
- the Infinite file downloader
wget -O /dev/null http://infinite-download.ma.ttias.be/download.php
or
- Nvidia global driver
wget http://us.download.nvidia.com/Windows/372.90/372.90-desktop-win8-win7-64bit-international-whql.exe
* Remove it afterwards
rm 372.90-desktop-win8-win7-64bit-international-whql.exe
* Install EPEL
- Latest release For CentOS 6:
rpm -Uvh http://mirror.nonstop.co.il/epel//epel-release-latest-6.noarch.rpm
- Latest release for CentOS 7:
rpm -Uvh http://mirror.nonstop.co.il/epel//epel-release-latest-7.noarch.rpm
* Cancel SELINUX server
setenforce 0
sed -i 's/enforcing/disabled/' /etc/selinux/config
* Get Information on an IP address
ipcalc -4bnp 10.9.81.38/29
* Checking traffic problems on the network interface:
ifconfig eth5 mtu 576
** network traffic monitor:
* all traffic on interface eth0
tcpdump -i eth0 -nn
* ICMP requests (by protocol)
tcpdump -i eth0 -nn 'proto ICMP'
* DHPC requests (by port)
tcpdump -e -i eth5.2 -nn 'port 67 || port 68'
* one host's traffic on eth0 (by host IP - can also use name)
tcpdump -i eth0 -nn 'host 192.168.0.1'
* remove (delete) e-mail files from mail queue
mailq | grep -v '^ *(' | awk 'BEGIN { RS = "" } { if ($7 == "bill.gates@microsoft.com")print $1 }' | tr -d '*!' | postsuper -d -
* install postfix+spamassasin+clamAV
yum update && yum install postfix spamassassin clamav clamav-scanner clamav-scanner-systemd clamav-data clamav-update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment