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

Multidimensional/Nested Arrays in JavaScript [Guide]

Multidimensional/Nested Arrays in JavaScript

This guide aims to succinctly show you how multidimensional arrays can be created and used in the JavaScript programming language. What are Arrays? Arrays are a key component in any app kind of app you may wish to build – arrays allow you to store an ordered list of variables or values of any length in a single variable – ready to be iterated over, displayed, or otherwise processed. For example, an array could contain a list of contacts for an instant messaging application, or … Read more

How to Rename Files & Directories in PHP [Examples]

PHP Rename File

This tutorial will show you to rename files and folders in PHP with the rename() function – including some code examples you can use in your own project. We’ve already covered uploading files and deleting files in PHP, read on to find out how to rename them. rename() PHP Function Syntax The syntax for the rename() function used to delete files in PHP is as follows: rename($FROM, $TO, $CONTEXT) Note that: $FROM is the path of the existing file you wish to rename $TO is the new path you wish to rename … Read more

Categories PHP

How to Set up AdBlock DNS Ad Blocking in OpenWRT

Setting Up Adblock Ad Blocking on OpenWRT

This tutorial will walk you through setting up DNS level Ad Blocking on your network by installing Adblock on an OpenWrt router. If you’re looking to set up an OpenWrt router of your own, check out our guide to setting up OpenWrt on a repurposed BT HomeHub. What is OpenWrt? OpenWrt is a Linux-based operating system designed to be run on routers and other embedded devices. It’s a full computer OS so you can do whatever you want with it, but its primary use (and … Read more

Output or Display an Image in the Browser from PHP

PHP Output Image File

This article will show you how to output or display an image in the web browser from PHP, with a quick copy & paste code snippet. Images in PHP We’ve covered how to resize images in PHP using the GD library. Once an image is created, it can be saved or returned to the browser to be displayed without saving it. Outputting/Displaying an Image in PHP without Saving it The following PHP code snippet creates an image object and returns it without saving it: // The header() function is … Read more

Categories PHP

How to Set up a Samba/SMB Windows Share in OpenWrt with LuCi

OpenWRT Samba SMB Share LuCi

This super quick tutorial will show you how to set up a Samba/SMB Windows network share on an OpenWrt device. This tutorial works best if you have some extra storage available for your file share – check out our article on adding extra USB storage to OpenWrt here. What is Samba? Samba is a file sharing package which provides network file shares compatible with the SMB and CIFs protocols used by Windows. Install Dependencies/Packages You will need to install two packages to set up the network … Read more

How to Locate the PHP.ini Configuration File [Linux/Ubuntu]

Locate PHP ini configuration

Here’s a quick tip on how to locate the php.ini configuration file which is currently in use by PHP on your system or web host. Locate PHP.ini From the Command Line You can usually find out which php.ini file PHP is pulling its configuration from from the command line. The php -i command will print the information about your current PHP environment and grep will filter that output to only lines containing the string ‘Configuration File’, including it’s location: php -i | grep ‘Configuration File’ Finding the PHP.ini Configuration in Use for … Read more

Categories PHP

Browsing the Internet on a 1993 Windows 3.11 All-In-One PC

Internet Browsing in Windows 3.11 via Raspberry Pi

I found some cool software called Web Rendering Proxy that lets your browse the internet on vintage computers and decided to try it out – here’s how it went. The result of this was that yes, I could browse the internet, and that yes, it was a completely miserable experience. But it was worth it anyway. What’s Involved A computer with an ethernet adapter Windows 3.11 For Workgroups Google will help you find a copy if you need one Microsoft TCP/IP-32 3.11b for Windows for Workgroups Again, … Read more

How to Use Microsoft Teams on Linux

Microsoft Teams on Linux

Microsoft Teams has exploded in popularity in the past year (people have been working from home a lot for some reason). Here’s how to use it on Linux. Microsoft Teams Microsoft Teams is a chat and collaboration platform from Microsoft. It covers video conferencing, voice and text chat and allows you to collaborate on documents. Like the rest of the Microsoft Office suite, it doesn’t run on Linux. OK, technically, it does run on Linux – there is a desktop client available – but it’s been a while … Read more

How to Install OpenWRT on a Raspberry Pi

Raspberry Pi OpenWRT

This article will show you how to install the OpenWRT operating system on a Raspberry Pi. I’ve previously covered this as part of our Installing OpenWrt on a BT HomeHub 5 article, but I thought I’d break it out on its own to make it easier to find for people who don’t want to wade through all of that just for the Raspberry Pi bit. What is OpenWRT? OpenWRT is a Linux-based OS designed to power routers and other networking devices. It comes tailored with … Read more

What is Bash/The Terminal/Linux Shell? What Do They Mean?

What is Bash? Bash Meaning

New to Linux and confused about the terminology surrounding the terminal, shells, bash, and the command line? This article explains what they are. The terms terminal, shell, command line, and Bash are thrown around a lot when discussing using Linux – sometimes interchangeably. They can all refer to the same thing, but they do have slightly different meanings. GUI vs Terminal – What are They? When we’re referring to the terminal we’re referring to the text interface used to control a computer by typing in text commands. A GUI is a different paradigm – … Read more