Welcome to LinuxScrew

A site for Linux lovers worldwide. For newbies, system engineers, administrators, and everybody in between. We cover all things Linux, plus various programming languages, including Python, Javascript, and PHP.

View our featured tutorials and projects in the slider below or scroll down to see all recent articles.

How to Convert a USB Printer to Wireless with a Raspberry Pi
How to Use a Raspberry Pi for Digital Signage
The Worst Things You’ll Probably Google As a Programmer on Linux
How to Build a Raspberry Pi Internet Kiosk
Browsing the Internet on a 1989 Macintosh II with a Web Rendering Proxy
previous arrow
next arrow
Slider

Guide: Install and Use Docker on Ubuntu 20.04

Install and Use Docker Ubuntu

This is an express tutorial on getting Docker up and running on Ubuntu 20.04 – Fast! Docker is a virtualization platform that has exploded in popularity due to its ease of use and low resource overheads. It is used to run applications inside containers, making them portable and easy to install – all of their dependencies and configuration can be kept separate even though they are being run on the same host – reducing the time it takes to configure your system and making sure applications … Read more

How to Set Up Nginx HTTPs Reverse Proxy on Ubuntu

Set Up Nginx HTTPs Reverse Proxy on Ubuntu

This tutorial explains how to set up Nginx as an HTTPS reverse proxy on Linux Ubuntu, What is Nginx? Nginx is a popular web server, reverse proxy, load balancing, mail proxy, and HTTP caching software package which can be run on the Linux Operating System. It’s a very flexible web server and proxy solution and is an alternative to the Apache HTTP Server. What is a Proxy Server A proxy server acts as a relay between a client and a server at the client’s request. … Read more

Using the ‘UNION’ Operator in MySQL and MariaDB

mysql union

MySQL SELECT queries are commands that pull data from your database tables according to conditions each record must meet. Complex queries will often need to combine the results from two or more SELECT queries – this is what the UNION operator does. UNION Syntax SELECT column [, column2, column3…] FROM first_table UNION SELECT column [, column2, column3…] FROM second_table; Note that: Each SELECT statement must have the same number of columns in its results Data type in each of the columns must match The columns … Read more

The Linux Shutdown (& Reboot) Command

Linux Shutdown

The shutdown command in Linux shuts down your computer safely. All users and processes will be notified, and processes are given the chance to exit safely. The shutdown command can also reboot and bring the system to other power levels. Syntax shutdown [OPTION]… TIME [MESSAGE] Options Here are the available options for the shutdown command, straight from the manual: Option Description -r Requests that the system be rebooted after it has been brought down. -h Requests that the system be either halted or powered off after it … Read more

Best Media Server Software for Linux [2021]

Best Media Server Software for Linux

Find the best media server software for Linux in 2021 with a built-in web client, native client, support for multiple formats, and more. Home media servers have become increasingly popular and there are a number of commercial and free options. Media servers are also a popular project for people tinkering with Raspberry Pi’s, can be a cool introductory project for people getting started in Linux and networking, or can just be a good way to put an old computer to use. Home media servers can … Read more

How to Check if a File or Directory Exists in Bash [+ Examples]

bash check if file exists

You can check whether a file or directory exists on a Linux system using the test command in bash. See our examples below to find out how. The test Command Syntax test EXPRESSION The test command will evaluate the EXPRESSION. Expressions can be built using the following operators and can be built using a combination of operators. -d file True if file is a Directory. [[ -d demofile ]] -e file True if file Exists. [[ -e demofile ]] -f file True if file is a regular File. [[ … Read more

Building a Python Script to Resize & Watermark Images [Code Included]

Building a Python Script to Resize Watermark Images

In this project, we take you through building, packaging, and publishing a command-line application using Python to resize and watermark images. Whenever I complete an article for LinuxScrew, I need to go through and add watermarks and make other small adjustments to any photos I’ve taken. This can be tedious so I thought, why not automate it. Then I thought, why not make a command-line app to do it (rather than just a bash script), and show you how you can make your own command-line … Read more

Guide to Foreign Key Constraints in MySQL and MariaDB [With Examples]

Guide to Foreign Key Constraints in MySQL

In this guide, we cover foreign key constraints in MySQL and MariaDB, along with a number of useful examples. MySQL (and its fork MariaDB) are Relational Database Management Systems (RDBMS) – Database Systems which hold data in tables which can be related to each other. Tables in an RDBMS are organized into columns that contain data in rows (also called tuples). Each row will usually have a Primary Key – a unique value to identify the row in the table. To define relationships between two rows in two different … Read more

Quickly and Easily Outlining Text in GIMP 2 [3 Easy Steps]

outline text in gimp 2

Here’s a quick 3-step method for outlining text in GIMP 2. GIMP is the most popular photo manipulation and image editing package for Linux. Many tutorials go through a long-winded process of converting the text to paths and expanding selections, but in the end, if you want quick results, this is the method to use. Step 1: Write some text using the text tool Click on the text tool in the toolbox, and write some text to outline. Step 2: Select the Text by Colour … Read more

Python “while” Loops [with Examples]

python while loops

This tutorial explains how to create loops in Python by using the “while” statement. Included below are the syntax and examples. In programming (and thus, in Python), a loop is a statement which will execute a block of code repeatedly until a condition is met, or the loop is broken out of manually. This article will look at Python Loops and conventions to use when writing them. Looping with the while statement, Syntax and Example Here is a basic loop which will increment (add 1) the variable ‘i’ … Read more