Category Archives: Linux

Clear ubuntu swap memory

sudo swapoff -asudo swapon -a Check swappiness : cat /proc/sys/vm/swappiness(default ubuntu 60) Change swappiness : temporary : sudo sysctl vm.swappiness=10 permanent : sudo vi /etc/sysctl.confadd/change linevm.swappiness=10

ubuntu apt-get install offline

Download package pada pc yg online dengan apt-get install nama-packagenya(dengan apt-get install, bukan apt install, klo apt install .deb-nya nggak diarchive)akan terdownload ke :/var/cache/apt/archives/silahkan dicopy *.deb ke usb dll. Kemudian pada pc offlinecopy balik *.deb ke :/var/cache/apt/archives/ lalu install dengan cara :apt-get install –no-download nama-packagenya untuk membersihkan folder achive gunakan perintahsudo apt-get clean

ping, ssh, scp ip6

ping6 -I eth ipv6ping6 -I ens37 fe80::250:56ff:fe38:f77e ssh ipv6%ethssh fe80::250:56ff:fe38:f77e%ens37 scp -6 file username@[ipv6%eth]:/path-destination/scp -6 telo.txt system@[fe80::250:56ff:fe38:f77e%ens37]:/home/system/

echo to syslog

logger hallo ballack -i Log the process ID in each line-f Log the contents of a specified file-n Write to the specified remote syslog server-p Specify a priority-t Tag the line with a specified tag

bandwidth limiter (netem)

Show sudo tc qdisc helpsudo tc qdics showsudo tc -s qdisc ls dev ens35 Contoh output tc qdics show :qdisc noqueue 0: dev lo root refcnt 2qdisc pfifo_fast 0: dev ens32 root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1qdisc pfifo_fast 0:… Read More »

rsync

rsync -avz system@ip-sumber:/home/system/telo-copy/ /home/system/telo-paste/ rsync -avz -e “ssh -p 2222” /home/system/telo-copy/ system@ip-tujuan:/home/system/telo-paste/ continous rsync :