Home » Linux

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 » Linux

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 » Linux

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 » Linux

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 » Linux

How to Save a File and Quit in Vim/Vi

How to Save a File and Quit in Vim Vi

In this guide, we explain how to save a file and quit/exit in Vim, how to save a file without exiting, and how to quit/exit without saving. Vim (Vi IMproved) is an open-source text editor for Unix or Linux. It’s used to write and edit text, either in the command line interface or independently through a GUI. It’s a great tool and like any software tool, one of the first things to learn about it is how to safely exit without losing all of your … Read more

Home » Linux

Debian: How to Add a User to Sudoers

Debian How to Add a User to Sudoers 1

In the Filesystem Hierarchy Standard used by Linux operating systems, all files and directories appear under the root directory “/” but access to it is often restricted for security reasons. In Linux distributions like Debian, you can gain full access from the SSH by using the “sudo” command. This tutorial explains how to add a user to Sudoers so that the user is permitted to run the sudo command. Logging in as a superuser or root user enables you to make system-wide modifications. “sudo” can … Read more

Home » Linux

How Change the Timezone in Linux

How Change the Time Zone in Linux

Linux is the world’s most widely used open-source operating system (OS). Because Linux is open-source, it means that the code is free and available to the public to view/use. Android, one of the most popular platforms on the planet, is powered by Linux. As such, Linux is used across the world in every time zone. In this article, we’ll explain how time zones work in Linux, and how to change the time zone. Time zones A time zone is a region/area in which the same … Read more

Home » Linux

Linux tr Command with Examples

linux tr command 1

In Linux and Unix systems, tr is a command-line utility that translates, erases, and “squeezes” repeated characters – in fact, tr stands for “translate.” This guide explains how to use the tr command in Linux, with examples. It can be used for operations such as removing repeated characters, converting lowercase to uppercase, and basic replacing and removing of characters. It is often used in conjunction with other commands through piping. Linux is the basic kernel/operating system core behind much of the technology we use on … Read more

Home » Linux

How to Grep for Multiple Words, Strings and Patterns

How to Grep for Multiple Words Strings and Patterns 1

This guide explains how to use the grep utility for searching multiple words, strings, and patterns. You can find full examples of the commands used to accomplish this below. What Is Grep? When we refer to grep, we’re talking about the command-line function. Grep stands for Global Regular Expression Print. In essence, it will search input files looking for lines that are a match to a certain regular expression. It then returns results by writing each line for standard output. The grep utility is suitable … Read more

Home » Linux

How to Get CPU Information on Linux

how to get cpu information linux

Within your computer, the central processing unit, aka the CPU, is a critical component. Despite its essential nature in performing countless data processing functions, many of us likely know very little about the CPU, hidden away inside the computer out of sight as it works its magic. Thankfully, finding CPU information on Linux systems is fairly straightforward, so let’s take a look at how it’s done. Why You Might Need CPU Information There are a few reasons why someone may want to obtain further CPU … Read more