Herramientas de usuario

Herramientas del sitio


wiki2:linux_tools

¡Esta es una revisión vieja del documento!


Linux Tools

fsz

Herramienta de autocompletado, para moverte con más agilidad en la terminal.

Keybindings:

  • ctrl+r para buscar en el historial
  • ctrl+t para seleccionar ficheros. Por ejemplo: rm - ctrl+t - escoger ficheros con tab - enter

Luego también puedes:

  • cd + TAB ===== KeyLogger ===== * https://github.com/kernc/logkeys * LogKeys <code> $ logkeys –start -d /dev/input/event6 -m /home/alfred/Desktop/logkeys-master/keymaps/es_ES.map </code> <code> –no-daemon –no-func-keys –output file </code> ===== PDF merge ===== <code> sudo snap install pdftk pdftk file1.pdf file2.pdf cat output mergedfile.pdf </code> ===== Enable, disable, and check the Ubuntu firewall ===== <code> sudo ufw enable sudo ufw disable sudo ufw status </code> ===== Limit downloading ===== <code> sudo apt-get -y install wondershaper sudo wondershaper <interface name> <down speed> <up speed> sudo wondershaper eth0 512 512 sudo wondershaper clear <interface name> </code> Wondershaper seems to work on x10, so to limit to 512Kbps and 50Kbps would be: <code> sudo apt-get install trickle sudo trickle -d 120 -u 32 </code> ===== Screen ===== <code> screen ./unix-shell-script-to-be-executed parameters screen -ls screen -X -S [session # you want to kill] quit </code> ===== Rclone ===== https://rclone.org/ <code> cp rclone /usr/bin/ chown root:root /usr/bin/rclone chmod 755 /usr/bin/rclone mkdir -p /usr/local/share/man/man1 cp rclone.1 /usr/local/share/man/man1/ mandb </code> An example for filtering: rclone sync path0 path1 -vv –filter-from filter_file.txt <code> - .git/ - .gitignore - tmp/ - .svn/ - dist/*.tar - dist/*.zip - .idea/ - pycache/ - .pyc + /migrations/init.py - /migrations/ + /static/ - static/ + * </code> ===== entr - Run a command when a file changes ===== <code> $ ls | entr sass main.scss > ../main.css | echo “compile” </code> :!: I do not know why, but sass main.scss > ../main.css ; echo “compile” does not work. ===== MiniUPnP ===== Este paquete te permite llamar a los comandos UPnP de tu router y abrir puertos desde la máquina local: <code> upnpc -a <ip> <puerto> <puerto_router> <protocolo(TCP|UDP)> upnpc -a 192.168.1.130 8000 8000 UPD </code> ===== Snaps ===== List applications used by snap: <code> snap list </code> Paths used by snap: <code> ~/snap /snap /var/snap /var/lib/snapd </code> ===== Configure a DNS server ===== To install it add the bind9 package. All its configuration for the names is placed on the /etc/bind path. You need to change the next file /etc/default/bind9 to accept IP v4: <code> # run resolvconf? RESOLVCONF=no # startup options for the server OPTIONS=“-4 -u bind” </code> Add those IP's allowed to query DNS into the main config: <code> allow-query { localhost;192.168.1.0/24; }; </code> :!: Examples will configure test.test, wiki.test.test… After this, if we wanted to add an url name we should create a zone (into the config for zones): <code> zone “test.test” { type master; file “/etc/bind/db.test”; allow-update { none; }; allow-query {any; }; }; </code> And in the file /etc/bind/db.test: <code> $TTL 86400 @ IN SOA dns.test. root.test.test. ( 3 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL ; @ IN NS dns.test. wiki IN A 192.168.1.250 auth IN A 192.168.1.251 </code> After this we can restart the service bind9. Before restarting it we can execute some checks: * named-checkconf * named-checkzone test.test db.test'' More doc: * https://help.ubuntu.com/community/BIND9ServerHowto * how_to_configure_bind_as_a_private_network_dns_server_on_ubuntu_18.04_digitalocean.pdf * setting_up_bind_as_a_private_dns_server_on_rhel_8.pdf
wiki2/linux_tools.1590921913.txt.gz · Última modificación: 2020/05/31 11:45 (editor externo)