Home » Articles by: Brad Morton

Bash Aliases – What They Are and How To Use Them

Bash Aliases

If you live in the Linux Shell/Terminal, aliases are a massive timesaver. Here’s how to create your own Bash aliases, with examples. What is an Alias in Bash/Linux Shell? An alias is a shortcut to a longer command. It’s similar to a keyboard shortcut – like the CTRL + C key combination is a shortcut to the copy command in many graphical operating systems (saving the time in dragging your mouse across the screen and clicking multiple menus to reach the command), aliases are shortcuts to longer terminal commands (saving time typing out the full … Read more

Home » Articles by: Brad Morton

OpenWrt: Set up a Basic Network Including WiFi Bridge, IP Address, DHCP

OpenWrt Network Setup

This article will show you how to configure a basic network with WiFi Bridging, DHCP on a fresh install of OpenWrt – with explanations and screenshots. This guide follows on from LinuxScrew’s guide to setting up OpenWrt on a BT HomeHub 5 – but you can follow along on any device (including a Raspberry Pi!). This article assumes you have an OpenWrt device you wish to start using. We’ll start by connecting it to your home WiFi network to get it online and then setting it … Read more

Home » Articles by: Brad Morton

OpenWRT: Secure DNS over TLS with LuCI [No Command Line]

OpenWrt Secure DNS TLS Tutorial

This article will show you a quick and clean way of getting secure DNS over TLS running on OpenWRT – without resorting to the command line. If follows on from our other OpenWrt Articles. We’ll be using stubby – a local DNS resolver that will encrypt local DNS queries and forward them to an external secure DNS resolver Provided by Cloudflare. Why Cloudflare? Because it’s the default secure DNS resolver in the default stubby configuration, that means we don’t have to edit the config files, and Cloudflare’s servers … Read more

Home » Articles by: Brad Morton

Segregating Devices and Networks in OpenWrt [Tutorial]

OpenWrt Segregated Wifi

This article will show you how to keep your devices separate on your OpenWRT managed network and follows the steps taken to set up a basic WiFi network covered here. Why would you want to keep your devices from talking to each other on a local network? I repair other people’s computers – other people who may not be too careful about what websites they visit. If I need to connect one of these computers to my home network, I want to make sure that they … Read more

Home » Articles by: Brad Morton

Python Matrix (2D Array, NumPy), With Examples

Python Matrix

This article will explain what a matrix is and how to use them in the Python Programming Language with the NumPy library. What is a Matrix In mathematics and computer programming, a matrix is a two-dimensional array of values. It is a grid of columns and rows, with each position in the grid holding one of these values. It is an array because it’s a collection of elements with multiple elements, and it’s two-dimensional because the values exist at two coordinates (i.e., rows and columns). … Read more

Home » Articles by: Brad Morton

Remove/Delete Files/Directories in Linux with rm

Linux rm Remove File Directory

This article will outline how to delete files and directories in Linux with the rm command and give example usage. The rm Command in Linux Files and directories can be deleted from the shell/command line in Linux using the rm command. rm Command Syntax rm OPTIONS FILES Note that: OPTIONS is a list of options from the below table FILES is a list of files or directories (if the -r option is specified) to be removed Multiple files or directories can be specified, separated by spaces Options Here are the most commonly used options for … Read more

Home » Articles by: Brad Morton

Copy a Table in MySQL/MariaDB – How To, With Examples

Mysql MariaDB Copy Table

This article will show you the BEST way to copy a table, with or without the data in it, in MySQL and MariaDB. Copying the Table with All Data in MySql The following code will copy a table including all data using the CREATE TABLE LIKE statement: CREATE TABLE new_table_name LIKE database_name.old_table_name; INSERT new_table_name SELECT * FROM database_name.old_table_name; There are other methods, some single line, but this is probably the best and simplest one. Why did I choose this method? Because it copies the table … Read more

Home » Articles by: Brad Morton

Move Files With the mv Command in Linux, With Examples

Linux Move File mv

This article will walk you through moving files in Linux with the mv command, with examples and tips on moving files safely. mv Syntax Moving files is done using the mv command, which has the following syntax mv OPTIONS SOURCE DESTINATION Note that: OPTIONS is a list of options from the below table SOURCE is the path to the file you wish to move DESTINATION is the path to the destination you want to move the file 2 This can include a new file name or simply be the path to a … Read more

Home » Articles by: Brad Morton

PHP vs HTML – What’s The Difference? Which Should You Use?

PHP vs HTML

This article will explain the difference between PHP and HTML and outline which you should use for your project (probably both – and I’ll explain why). If by the end of this article you’re still trying to navigate your way through the different web programming languages, check out these other explainers: jQuery vs. JavaScript – Differences? Which is Better? PHP vs. JavaScript – The Best Choice For Your Project TypeScript Vs. JavaScript – What’s the Difference & Which Should You Use? MySQL vs. MariaDB vs. … Read more

Categories PHP

Home » Articles by: Brad Morton

How To Run a Python Script (Python 2/3)

How to Run Python Scripts

This article will show you how to run both Python 2 and Python 3 scripts in Linux and find out what versions of Python are installed. Running a Script To run a Python 3 script: python3 /path/to/script.py To run a Python 2 script: python2 /path/to/script.py Read on to find out how to install Python and find out which versions you have installed. Installing Python on Linux You can see what Python packages are installed on your system by running the following commands: which python which … Read more