disabling openvpn@server sudo update-rc.d openvpn disable sudo service openvpn status sudo systemctl status openvpn@server sudo systemctl status system-openvpn.slice Won’t work with systemctl disable openvpn or service openvpn stop.
Commands
mount command
/etc/exports /i-data/60cb70cf 192.168.1.0/24(ro,sync,no_subtree_check,wdelay,no_root_squash) mount NFS share to windows 7 (next drive letter available) mount 192.168.1.31:/i-data/60cb70cf * mount NFS share to windows 7 the Z drive mount 192.168.1.31:/i-data/60cb70cf z: unmount NFS share (–a Unmounts all NFS network drives) umount z: mount […]
Linux network information
DNS address assigned by DHCP nmcli device show eth0 | grep DNS Gateway address assigned by DHCP nmcli device show eth0 | grep GATEWAY Show active and ofline connections nmcli connection show Load configuration files nmcli con reload nmcli con […]
iptables
iptables processing steps (original image link) Redirect eth0:3240 to 127.0.0.1:32400 sudo sysctl -w net.ipv4.ip_forward=1 sudo sysctl -a | grep ‘net.ipv4.ip_forward’ sysctl net.ipv4.ip_forward -> this reads the value sudo sysctl -w net.ipv4.conf.eth0.route_localnet=1 sudo sysctl -a | grep ‘net.ipv4.conf.eth0.route_localnet’ # you’ll need […]
Linux media conversion
sudo apt install libav-tools webm to mp4 http://askubuntu.com/questions/323944/convert-webm-to-other-formats ffmpeg -i “Jurjak – Bucuresti.webm” -qscale 0 “Jurjak – Bucuresti.mp4” ffmpeg -fflags +genpts -i “Jurjak – Bucuresti.webm” -r 24 “Jurjak – Bucuresti1.mp4” -> change to 24 FPS ffmpeg -i “Jurjak – Bucuresti.webm” […]
Linux hardware information
# sources: # http://askubuntu.com/questions/18372/how-can-i-find-out-what-ram-a-computer-system-has RAM sudo lshw -short -C memory sudo lshw -C memory sudo dmidecode -t memory VGA memory sudo dmesg | grep Reserving [ 0.000000] Reserving Intel graphics stolen memory at 0x5ef00000-0x7eefffff compute now using a hexadecimal calculator […]
lsof
What files are open? lsof What process has a particular file open? lsof /path/to/the/file What files in some directory are open? lsof +D /path/to/the/dir What files does some user have open? lsof -u username What files do a group of […]
Ufw (uncomplicated firewall)
documentation https://help.ubuntu.com/lts/serverguide/firewall.html http://manpages.ubuntu.com/manpages/xenial/en/man8/ufw.8.html http://manpages.ubuntu.com/manpages/xenial/en/man8/ufw-framework.8.html important files /etc/ufw/user.rules Uncomplicated Firewall # https://help.ubuntu.com/community/UFW sudo ufw show added sudo ufw status verbose sudo ufw show listening sudo ufw limit ssh sudo ufw allow 80 sudo ufw allow 443 sudo ufw allow 32400 sudo […]
APT (Advanced Package Tool)
checking that python3-pip package is installed dpkg –get-selections python3-pip search packages by name using REGEX see http://newbiedoc.sourceforge.net/tutorials/apt-get-intro/info.html apt-cache search libapr apt-cache search ‘php.*sql’ apt-cache search apache.\*perl apt-cache search elvis\|vim list the contents of a (not-installed) package see https://unix.stackexchange.com/questions/6311/how-to-find-out-which-not-installed-package-a-file-belongs-to apt-file list […]
Linux various commands
# show only first line found: grep “search this” nohup.out | sed -n ‘1p’ # show only last line found: grep “search this” nohup.out | sed -n ‘$p’ # copy to current path the file /home/gigi/systemctl-services.txt # from adrhc.go.ro (remote […]
Docker
How To Install Docker on Ubuntu 19.04 Kitematic which provide a GUI to the users avoid typing sudo whenever you run the docker command sudo usermod -aG docker ${USER} # check service status sudo systemctl status docker # pull and […]
Yum
# https://www.centos.org/docs/5/html/yum/ # http://linux.duke.edu/projects/yum/ The Alert Icon is part of the up2date application, which enables you to easily install system updates. You may use any of the following formats to specify a package in a yum operation: name, name.architecture, name-version, […]
Asrock N3150DC-ITX
Windows with High Precision Event Timer (HPET) I installed windows 7 with HPET disabled in BIOS. Then if you do: bcdedit /set useplatformclock true -> with HPET enabled windows won’t boot bcdedit /deletevalue useplatformclock -> disables HPET from an administrative […]
Angularjs project setup (NODE & YEOMAN)
# see also https://docs.angularjs.org/guide/migration # general setup sudo ln -s /usr/bin/nodejs /usr/bin/node -> when node file is not found sudo npm install -g yo bower grunt-cli generator-karma generator-angular # see https://docs.npmjs.com/cli/view # npm help list # sudo npm list -gp […]
npm
show npm configuration npm config list npm config ls -l -> to show all defaults outdated packages listing global outdated packages npm outdated -g –depth=0 update packages named n respectivelly npm sudo npm update -g n npm show npm cache […]