deb http://ftp.us.debian.org/debian/ jessie main
deb-src http://ftp.us.debian.org/debian/ jessie main
deb http://security.debian.org/ jessie/updates main contrib
deb-src http://security.debian.org/ jessie/updates main contrib
# jessie-updates, previously known as 'volatile'
deb http://ftp.us.debian.org/debian/ jessie-updates main contrib
deb-src http://ftp.us.debian.org/debian/ jessie-updates main contrib
====================================================================
vi
i = insert text before cursor
a= append text after cursor
o = open and put text in a new line below current line
x = delete single character under cursor
dd = delete entire current line
yy = copy the current line into the buffer
p = paste the line in the buffer into the text after the current line
====================================================================
apt-get install vim ssh htop iftop curl telnet ntp ntpdate
====================================================================
iftop -i eth0
====================================================================
ps -eaf | grep php
====================================================================
vim /etc/rc.local
ifconfig eth0:0 inet 192.168.x.x/24 up #virtual network interface (2nd ip)
====================================================================
vim /etc/network/interfaces
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 192.168.101.9
netmask 255.255.254.0
network 192.168.100.0
broadcast 192.168.101.255
gateway 192.168.100.1
dns-nameservers 8.8.8.8 8.8.4.4
====================================================================
vim /root/.vimrcset nu
syn on
set paste
set ruler
set expandtab
set tabstop=4
====================================================================
dpkg-query -f '${binary:Package}\n' -W | grep mysql
dpkg-query -f '${binary:Package}\n' -W | grep dovecot
====================================================================
apt-get install screen
screen --> run it to enter the background screen
rsync --bwlimit=4000 -azv --progress * root@192.168.0.62:/samba/anonymous/
Ctrl+a -> d --> Quit from the process screen above
Ctrl+c --> Stop the task
screen -ls --> show detached task
screen -r --> Reattach a session
ps -eaf --forest
====================================================================