dd if=/dev/zero of=/dev/sda bs=1M be careful!!!
clean swap space howto
free +m sync; echo 3 > /proc/sys/vm/drop_caches swapoff -a swapon -a
mount windows shared folder in linux
mkdir /mnt/winshare
mount -t cifs //192.168.247.26/share-name /mnt/winfolder
-o username=user,password=password,domain=domain
/dev/tape: Inappropriate ioctl for device
/dev/st0 – Block device, rewinds to the beginning of the tape after an operation.
/dev/nst0 – Block device, does not rewind the tape
/dev/tape- Symbolic link, typically links by default to /dev/st0
Here is the solution
rm -rf /dev/tape
ln -s /dev/st0 /dev/tape
apache connections
count the apache connections
netstat -nt | grep :80 | wc -l
show number of connections for each ip address
netstat -ntu | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort –
netstat -an|awk ‘/tcp/ {print $6}’|sort|uniq -c
teamviewer daemon is not running | teamviewer 8
the reason is that the teamviewer daemon is not running, to start it
teamviewer –daemon start
initctl start teamviewerd
teamviewerd start/running, process 26548
ssh server in freebsd howto
cd /usr/ports/security/openssh-portable
make config;make install clean
cp /etc/make.conf /etc/make.conf.old
echo “NO_OPENSSH = YES” >> /etc/make.conf
cd /etc/ssh/
cp sshd_config sshd_config.old
cp sshd_config-dist ssh_config
/etc/rc.d/sshd restart
Stopping sshd.
Starting sshd.
open /etc/rc.conf and add
sshd_enable=”YES”
install nano text editor in freebsd
cd /usr/ports/editors/nano
make install clean
ln -s /usr/local/bin/nano /usr/bin/nano
W: GPG error: stable Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY E585066A30C18A2B
W: GPG error: http://dl.google.com stable Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY A040830F7FAC5991
W: GPG error: http://deb.opera.com stable Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY E585066A30C18A2B
W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 52A794126E3AB2D3
W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 83FBA1751378B444
W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 00A6F0A3C300EE8C
W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 531EE72F4C9D234C
W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 7FB8BEE0A1F196A8
W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY A7E13D78E4A4F4F4
W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 464AD83D4631BBEA
W: GPG error: http://download.virtualbox.org precise InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 54422A4B98AB5139
W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 6AF0E1940624A220
W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 991E6CF92D9A3C5B
W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY C2518248EEA14886
W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY C2518248EEA14886
W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY C2518248EEA14886
W: GPG error: http://mirrors.dotsrc.org precise-getdeb Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY A8A515F046D7E7CF
W: GPG error: http://linux.dropbox.com precise Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY FC918B335044912E
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise/Release Unable to find expected entry ‘estricted/binary-i386/Packages’ in Release file (Wrong sources.list entry or malformed file)
here is the solution:
apt-key adv –keyserver keyserver.ubuntu.com –recv-keys A040830F7FAC5991 A8A515F046D7E7CF E585066A30C18A2B 52A794126E3AB2D3 83FBA1751378B444 00A6F0A3C300EE8C 531EE72F4C9D234C 7FB8BEE0A1F196A8 A7E13D78E4A4F4F4 464AD83D4631BBEA 6AF0E1940624A220 991E6CF92D9A3C5B C2518248EEA14886 C2518248EEA14886 C2518248EEA14886 54422A4B98AB5139 FC918B335044912E
network interface configuration in CentOS
network config files are located in
/etc/sysconfig/network-scripts/
cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=”eth0″
BOOTPROTO=”none”
IPADDR=”192.168.0.2″
NETMASK=”255.255.255.0″
GATEWAY=”192.168.0.1″
HWADDR=”51:57:00:cd:a8:23″
NM_CONTROLLED=”yes”
ONBOOT=”yes”
TYPE=”Ethernet”
UUID=”xxxxxx-xxxx-xxxx-xxx-xxxxxxx”