Author: john

  • Linux Cheat-sheet

    Linux Cheat-sheet

    As I get into Linux a little more and learn some handy commands, I’m going to document them here.

    ssh user@server -m [algorithm] Sometimes when reaching from Windows into Linux you need to force agreement on the security algorithm both sides are using

    ssh -Q mac to query what security algorithm are available

    nano –linenumbers [file name] text editor

    df -h to get list of folders and space in Linux

    fdisk -l to get disk info

    du -ah to get disk usage for all files and directory

    du -sh for current directory

    chmod 755 [file_name] grant most everything rights

    Ln -s [file or dir name] make symbolic link

    unlink [file or dir name] remove symbolic link

    rm -d to remove directory

    rm -dr to remove not empty directory

    history | grep [search term] -A 10 -B 10 ### search history and show the 10 lines before and after

    ls -a or -ll to list all files and folders with more details, or hidden ones

    ip -c a to get a list of network interfaces in color!

    sudo ip addr add [server IP]/24 dev [interface name] set the interface to use given IP, needs the following to turn on

    ip link set dev [interface name] up or down, to turn on or off a network interface

    ip route add default via [gateway IP] dev [interface name] sets default route to gateway

    sudo nano /etc/systemd/resolved.conf, scroll down and un-comment or amend “DNS=” line to add the DNS servers you need. Will have to restart service with sudo systemctl restart systemd-resolved

    sudo nano .bashrc (from home directory), scroll down to line 46 or so and un-comment the force_color_prompt line to get colored terminal output. You will have to logout/login to get the change.

  • Lucky 13 Racing

    Lucky 13 Racing

    I got the kids an Xbox for Christmas and started enjoying Forza Horizon 4 myself. The driving is simplistic with a joystick but I don’t want to commit enough to justify a $400 steering wheel for the console.

    That said, the game has a fantastic way of adding your own graphics to the vehicles. I picked the bright pink for no reason, I suppose. The Boy disavows it and the Girl thinks pink is too girly, so to annoy both of them? Anyway with that out of the way, I was able to add my racing number all over like Colnago labels his bikes. The Ford was the first, as I got new cars or trucks I added more yellow graphics to the sides.

  • Migrating Unifi Controller

    I have a VM at home that runs Windows 2008 and I put the Ubiquiti controller on it and stood up first one and then another AP to provide wireless all over my house.

    For obvious reasons I need to move away from Windows 2008 and looking at the resources on my host, thought moving the controller to a small Linux server. It would be dedicated to the controller and not any other tasks like I was using Windows for. This also allows me to learn a little more about Linux, so two birds, one stone.

    First I looked at getting an appliance. But this didn’t allow me the learning opportunity I wanted.

    Next, I tried about 5 different distros and some were extremely fast and lightweight! Bodhi linux was suggested as small and light, still with a GUI, but it was a little to odd for me to get working. Second I tried Lubuntu, again with a lightweight footprint and GUI. Again I couldn’t get all the parts working as desired. The fastest response I got was using TinyCore linux. A minimal GUI and the way applications are used threw me off.

    In the end, I just went with server version of Ubuntu. There were more distro’s suggested but all used the server install underneath; I might as well go to the source! I just had to figure out YAML for the networking and I was off and running.

    Unfortunately, I was still missing something to get the controller software downloaded and operational. Perhaps it was something I was mis-translating from doing this on a Raspberry Pi. I found a middle ground where there was a script to do most of the work, but it also was missing some parts.

    Finally! I found this script (thanks Glenn!) that covered all the needed parts and matched my distro! Ran this and my new controller came right up! Now the step of migrating the AP from one controller to the next.

    In the end, you just restore a backup of the old controller, after turning it off. The new controller picks up the AP and all other settings. Works like a dream!

    Hopefully this helps you too.