Helpful EdgePoint commands

Initial setup from command line

initial-setup 

show interfaces

ubnt@ubnt:~$ show interfaces
 Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
 Interface    IP Address                        S/L  Description                 
 ---------    ----------                        ---  -----------                 
 br0          10.2.2.1/24                  u/u  Local Bridge                
 br0.73       -                                 u/u                              
 br0.75       -                                 u/u                              
 eth0         192.168.99.1/24                   u/u  Internet                    
 eth1         -                                 u/u  Local Bridge                
 eth2         -                                 u/D  Local Bridge                
 eth3         -                                 u/u  eth3-pc1      
 eth4         -                                 u/u  eth4-printer         
 eth5         -                                 u/u  eth5-pc3 
 eth6         -                                 u/u  eth6-rotuer         
 eth7         -                                 u/u  eth7-extra                 
 lo           127.0.0.1/8                       u/u                              
              ::1/128                          
 ubnt@ubnt:~$

Double tab in session to show more commands

wsubnt@ubnt:~$ 
 Possible completions:
   add           Add an object to a service
   clear         Clear system information
   configure     Enter configure mode
   connect       Establish a connection
   copy          Copy data
   debug         Enable debugging of specified routing protocol
   delete        Delete a file
   disconnect    Take down a connection
   generate      Generate an object 
   initial-setup Enter initial configuration dialog
   no            Disable or reset operational variable
   ping          Send Internet Control Message Protocol (ICMP) echo request
   ping6         Send IPv6 Internet Control Message Protocol (ICMP) echo request
   reboot        Reboot the system
   release       Release specified variable
   rename        Re-name something.
   renew         Renew specified variable
   reset         Reset a service 
   restart       Restart a service
   set           Set system or shell options
   show          Show system information
 ubnt@ubnt:~$ ws

EdgePoint – set IP configuration to DHCP via command line

Change eth0 to the interface you would like to change.

SSH into EdgePoint and type in configure to get into a configuration prompt

configure

Now set interface eth0 to dhcp

set interfaces ethernet eth0 address dhcp

Delete the static IP address on eth0 if needed

delete interfaces ethernet eth0 address 192.168.1.1/24

Save changes

commit

wget multiple links with random access times

Create a file “list.txt” that contains all the URLs you want to download and launch the following command

for i in cat list.txt ; do wget ${i} && sleep $(( ( RANDOM % 120 ) +1 )) ; done

It’ll now run and after each link will wait a random amount of time up to 120 seconds before downloading the next link. Change the number as needed.

Bash random sleep timer

Change the 10 to however many seconds you need or want.

echo $(( ( RANDOM % 10 ) +1 ))

Example output

bob@localhost:~$ echo $(( ( RANDOM % 10 ) +1 ))
10
bob@localhost:~$ echo $(( ( RANDOM % 10 ) +1 ))
2
bob@localhost:~$ echo $(( ( RANDOM % 10 ) +1 ))
9
bob@localhost:~$ 

Sleep timer

sleep $(( ( RANDOM % 10 ) +1 ))

kubuntu-desktop : Depends: software-properties-kde but it is not going to be installed

Try installing software-properties-kde and get

The following packages have unmet dependencies:
  software-properties-kde : Depends: python3-software-properties (= 0.96.24.32.11) but 1.8.8 is to be installed
 E: Unable to correct problems, you have held broken packages.

Try to install python3 from the bionic from bionic-updates

sudo apt install -t bionic-updates python3-software-properties

Install software-properties-kde

sudo apt install software-properties-kde

If it fails try force installing it

sudo dpkg -i --force-overwrite /var/cache/apt/archives/software-properties-kde_0.96.24.32.11_all.deb

Install Kubuntu desktop

sudo apt install kubuntu-desktop

More info here
https://pravin517.wordpress.com/2019/07/14/kubuntu-desktop-depends-software-properties-kde-but-it-is-not-going-to-be-installed/

Install KDE on Linux Mint 19.2

First add the following repo

sudo add-apt-repository ppa:kubuntu-ppa/backports

Make sure you are updated and upgraded

sudo apt-get update && sudo apt-get dist-upgrade

And if needed do a reboot

sudo reboot

Install the KDE desktop

sudo apt install kubuntu-desktop

Log out, select Plasma and log back in.

https://computingforgeeks.com/how-to-install-kde-plasma-desktop-on-linux-mint-19/

Setup DHCP server on Linux

Install dhcp server software

sudo apt install isc-dhcp-server

Edit the following config file and set the networking interface it should use. In this case enp60s0

sudo vi /etc/default/isc-dhcp-server

Example line to change

INTERFACESv4="enp60s0"

Now edit the dhcpd.con file

sudo vi /etc/dhcp/dhcpd.conf 

Add the following in. Change the addresses and settings as needed.

subnet 192.168.47.0 netmask 255.255.255.0 {
   range 192.168.47.26 192.168.47.30;
   option domain-name-servers ns1.internal.example.org;
   option domain-name "internal.example.org";
   option subnet-mask 255.255.255.0;
   option routers 192.168.47.1;
   option broadcast-address 192.168.47.255;
   default-lease-time 600;
   max-lease-time 7200;
 }

Set a static ip on the computer that’ll be acting as the dhcp server. You can set it as the gateway if it is the gateway.

Allow dhcp through the firewall

sudo ufw allow  67/udp
sudo ufw reload
Restart the service and connect a client.

sudo systemctl restart isc-dhcp-server

More info.

You can look at dhcp leases with the following command

tail -f /var/lib/dhcp/dhcpd.leases

Run iperf speed test on Linux

Install iperf

sudo yum install iperf3

Launch server with

iperf3 -s 

If you want you can have it bind on a certain interface which can be useful in some causes if you have multiple IP addresses on the system. The IP address is the local address of the machine.

iperf3 -s -B 192.168.1.1

Note you may need to disable the firewall to allow access from the client

sudo systemctl stop firewalls

From the client computer install iperf and run it.

iperf3 -c 192.168.1.1

Clonezilla – Clone Windows 10 from single SSD to New Raid 0 SSD Volume

Boot up and create your raid array

Boot into Clonezilla and get to command line :cry: unfortunately you can’t clone from disk to raid in clonezilla interface, however we can do it from the command Line!

Basic steps are as follows. Replace raidarray with the name of your raid array.

  • Initialize raid array with dmraid -ay or kpartx -a /dev/mapper/raidarray
  • use gdisk to backup structure of source drive
  • Write gdisk backup to raid array
  • use ntfsclone to clone to raid array
  • ntfsclon –overwrite /dev/mapper/raidarray /dev/sdSOURCEDRIVE