Home » 2020 » November

The Linux ‘cp’ Command: Copy files and Directories

'cp' Command

This tutorial will teach you to use the Linux cp command – the command that copies files from one directory to another. Linux is the preferred platform for a lot of developers. If you’re new to Linux it won’t be long before you need to start copying files from one place to another – read on for an explanation of the Linux cp command and some tips and tricks on how to use it. The cp Command The cp command has a simple purpose – to copy files and folders … Read more

Home » 2020 » November

Best Raspberry Pi and Pi Zero Projects – Upgrade Your Home With Our Favourite Picks

Best Raspberry Pi and Pi Zero Projects

Looking for some home projects to keep you occupied over the winter months? LinuxScrew has you covered with this collection of Raspberry Pi projects for your home! Best Raspberry Pi Projects Raspberry Pis are cheap single-board computers that can be used for a variety of tasks – from desktop computers to web servers, and automation. Read on for some great projects for your home that utilize the Raspberry Pi and Pi Zero. Raspberry Pi CCTV System Turn a raspberry pi and a USB webcam into … Read more

Home » 2020 » November

How to use ‘try/catch’ in PHP (with Examples)

'try/catch' in PHP

PHP is one of the most popular programming languages used to develop web applications and APIs. Linux is the system of choice for serving up your PHP code and is also an ideal PHP development environment. When writing PHP code, you’ll sometimes want to perform a certain action when an error is encountered (rather than just sending the user an error message and halting code execution). This is exactly what try/catch is used for in PHP. Syntax try { // Code to attempt } catch (Exception $e) { … Read more

Categories PHP

Home » 2020 » November

How to Use “if… else” in JavaScript (with Examples)

"if... else" in JavaScript

JavaScript has quickly become one of the most popular programming languages due to its ease of use and flexibility – it can be run in just about any web browser on any device making it perfect for cross-platform apps. Linux is the most popular platform for hosting JavaScript Apps built with Node.js and is a great platform for developing both standalone JavaScript programs and browser-based solutions. If you’re learning JavaScript the if… else control structure is one of the first things you’ll want to get the hang … Read more

Home » 2020 » November

How to Add a User to a Group in Linux (With Examples)

Add a User to a Group in Linux

In this tutorial, we’ll examine adding users to groups. Bash shell commands are powerful tools for achieving specific needs. Groups are an effective way to share and protect information. File permissions in Linux allow you to set ownership by user rights, group rights, and global. It’s also a perfect way to maintain user permission to root. Let’s dig into that. Adding a user with a group (wheel) You’ve on-boarded a new admin, and you need to make them an administrator on a file server. The … Read more

Home » 2020 » November

How to Use “if… else” in Bash Scripts (with Examples)

if else bash

Bash scripting is a vital tool for developers to automate tasks in Linux. Bash scripts can be used to automate development tasks locally (like uploading files for deployment, compiling apps, or resizing images in bulk), as well as for server-side tasks (sending scheduled emails, collecting data at intervals, or sending notifications to devices). You’ll want to run some tasks dependent on the outcome of another task or variable, and that’s where if … else will help you. This decision making process in Bash scripts is called using conditionals. … Read more

Home » 2020 » November

Arduino vs Raspberry Pi: What are they and which one should I use?

arduino vs raspberry pi 1

This article explores the differences and common uses for the Raspberry Pi and Arduino hardware platforms. You’ll see a lot of talk about “Arduino vs. Raspberry Pi” as if they’re competing products – but they’re not! Arduinos and Raspberry Pis may both have started as small, affordable teaching platforms, but their intended uses are different, and they have diverged into two families of products with very different features that can do very different things. Check out the guide below to help you decide which one to choose for your next project. … Read more

Home » 2020 » November

How To Remove Items From A List in Python (With Examples)

python remove items from list

Python is widely used for both scripting and automation on Linux, as well as building web and standalone applications. Python is designed to be easy to learn, easy to write, and easy to read. It’s a great multi-purpose programming language. Python has several different types of arrays for storing data. Lists are arrays which allow you to store items. Items in lists can be altered, and are stored in a specific order. Syntax and Examples There are several methods you can use to remove an … Read more

Home » 2020 » November

Linux cp Command: How to Copy Files and Directories

Linux cp command How to copy files and directories

In this tutorial, we explain how to use the cp command in Linux to copy files or directories. Examples are included below. Linux is one of the most popular Operating Systems on the planet and is the basis for all Android devices. It is open-source and has some clear advantages over other systems such as Windows or macOS. Within Linux, there are a considerable number of different commands that programmers use regularly. What is the cp command? The copy (cp) command is one of the … Read more

Home » 2020 » November

How to Make Multiline Comments in Python

How to make multi line comments in Python

In this tutorial, we explain the two methods used to make multiline comments in Python, with examples. There are some drawbacks to one of the methods, so pay attention. Code without comments is like a story written in a language you only half understand. You might be able to figure out the main points, but you’ll miss some nuances and it would be way easier with a translation alongside it. Most coders hate code with no comments or limited comments, so finding ways to clearly … Read more