UBUNTU DUMP
Ubuntu clean up
sudo apt-get update sudo apt-get clean sudo purge-old-kernels (fixed /boot 100% issue) sudo apt autoremove sudo update-grub |
Ubuntu bandwidth testing
sudo apt-get install iperf ### client server setup iperf -c 192.168.51.115 iperf -s EXAMPLE donald@R2-D3:~$ iperf -c 192.168.51.115 ------------------------------------------------------------ Client connecting to 192.168.51.115, TCP port 5001 TCP window size: 45.0 KByte (default) ------------------------------------------------------------ [ 3] local 192.168.100.115 port 53340 connected with 192.168.51.115 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0-10.2 sec 9.75 MBytes 8.02 Mbits/sec donald@R2-D3:~$ iperf -s ------------------------------------------------------------ Server listening on TCP port 5001 TCP window size: 85.3 KByte (default) ------------------------------------------------------------ [ 4] local 192.168.100.115 port 5001 connected with 192.168.51.115 port 37054 [ ID] Interval Transfer Bandwidth [ 4] 0.0-10.6 sec 5.50 MBytes 4.34 Mbits/sec ----------------------- ubuntu@ubuntu_pie:~$ iperf -s ------------------------------------------------------------ Server listening on TCP port 5001 TCP window size: 85.3 KByte (default) ------------------------------------------------------------ [ 4] local 192.168.51.115 port 5001 connected with 192.168.100.115 port 53340 [ ID] Interval Transfer Bandwidth [ 4] 0.0-10.4 sec 9.75 MBytes 7.85 Mbits/sec ubuntu@ubuntu_pie:~$ iperf -c 192.168.100.115 ------------------------------------------------------------ Client connecting to 192.168.100.115, TCP port 5001 TCP window size: 43.8 KByte (default) ------------------------------------------------------------ [ 3] local 192.168.51.115 port 37054 connected with 192.168.100.115 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0-10.2 sec 5.50 MBytes 4.53 Mbits/sec |
Unable to Browse Samba share via Windows 10
If you are unable to browse samba shares via windows 10 make the following changes. -------------------------------------------------------------------------------------------------------------------------- If you want to enable insecure guest access, you can configure the following Group Policy settings: Computer configuration\administrative templates\network\Lanman Workstation "Enable insecure guest logons" Note By enabling insecure guest logons, this setting reduces the security of Windows clients. ------------------------------------------------------------------------------------------------------------------------- |
SSH login insults
#edit the sudo file sudo nano /etc/sudoers #add this and save Defaults insults #example tester@ns1:/home$ sudo mkdir test [sudo] password for tester: I've seen penguins that can type better than that. [sudo] password for tester: |
Change terminal colours
sudo nano ~/.bashrc #add this to the end of the file PS1='\[\033[1;36m\]\u\[\033[1;31m\]@\[\033[1;32m\]\h:\[\033[1;35m\]\w\[\033[1;31m\]\$\[\033[0m\] ' #save and exit crtl o <enter> crtl x #force change source ~/.bashrc |
Web Server Install on Pi 1
#install web server on pi 1 #install apache 2 sudo apt-get install apache2 -y #install php5 sudo apt-get install php5 libapache2-mod-php5 -y #install php curl sudo apt-get install php5-curl #take ownership and rename index.html sudo chown pi: /var/www/html/index.html sudo mv index.html index.html.old #create php index file sudo nano index.php <?php echo "Pi 1 with apache & php & php curl"; ?> <?php echo date('Y-m-d H:i:s'); ?> <?php phpinfo();?> #save and exit crtl o then crtl x #restart apache sudo service apache2 restart |
List
#list processes for all users ps aux ps auxf #list processes for all user ps U <username> kill <process number> #list processes, cpu, memory top #list open files (add -U for user) lsof #list files and sort in reverse order of date Ls -lathr |
Ubuntu / Linux SCP
***scp To copy all from Local Location to Remote Location (Upload) scp -r /path/from/destination username@hostname:/path/to/destination To copy all from Remote Location to Local Location (Download) scp -r username@hostname:/path/from/destination /path/to/destination -p (total time) |
Handy Apps
**LIST sudo add-apt-repository ppa:flexiondotorg/youtube-dl-gui sudo apt update sudo apt install youtube-dlg |
Ubuntu DNS Server
*** NOTES reverse lookup zone 192.168.0.0/27 - configure as below 0-31 being the range and 0.168.192 being the subnet zone "0-31.0.168.192.in-addr.arpa" { type master; file "master/192.168.0.0-31.rev"; }; ---------------------------------- Master and Slave example /etc/bind/named.conf.local zone "ddr.dc1.local" { type master; file "/var/lib/bind/ddr.dc1.local.hosts"; allow-transfer { 192.168.11.12; 192.168.20.11; 192.168.20.12; }; }; zone "11.168.192.in-addr.arpa" { type master; file "/var/lib/bind/192.168.11.rev"; allow-transfer { 192.168.11.12; 192.168.20.11; 192.168.20.12; }; }; ----------- zone "ddr.dc1.local" { type slave; file "/var/lib/bind/ddr.dc1.local.hosts"; masters { 192.168.11.11; }; }; zone "11.168.192.in-addr.arpa" { type slave; file "/var/lib/bind/192.168.11.rev"; masters { 192.168.11.11; }; }; ------------------------------------------- sudo apt-get purge --auto-remove bind9 **updates servers** sudo rndc reload ddr.dc1.local sudo rndc reload 11.168.192.in-addr.arpa |
1-10 of 32