The date command on Linux can be used to see the current date and time, but we can also use addition and subtraction arithmetic with the command to extend its functionality. For example, instead of seeing the current date, we can see the date and time from five days ago, five years in the future, etc. The possibilities here are endless.

This becomes useful in many situations. One such example would be when you're creating backups, you can use the date command to assign files a dated name, or even to delete older backups by using some substraction arithmetic. We'll cover this specific example below so you can see it in action, but as you can imagine, there are many more cases where it would be handy.

In this guide, you'll see various date command examples involving addition and subtraction. Feel free to use these commands on your own system or in your own scripts to get acquainted with the command.

In this tutorial you will learn:
  • date command arithmetic and subtraction examples
Addition and subtraction examples with date command on Linux
Addition and subtraction examples with date command on Linux

In this guide, we will show you a short script that can be used to convert a binary number to a decimal number in Python on Linux. This script uses casting which is used to convert a variable from one type to another. In this case, we use Python casting to convert a string to decimal number that is an integer.

Check out the script below to use it on your own system.

In this tutorial you will learn:
  • How to convert binary number to decimal with Python

Git is without doubt the most used version control system in the world. The software is open source, released under the GPLv2 license, and was created by Linus Torvalds, which is also the father of Linux. In this tutorial we learn the basic concepts behind its usage, we see how to create or clone a git repository and how to perform the basic actions involved in the git workflow.

In this tutorial you will learn:

  • The basic git concepts
  • How to create a git repository
  • How to clone a git repository
  • How to add file contents to the repository index
  • How to create a commit
  • How to push changes to a remote repository
  • How to pull changes from a remote repository
main-image
Introductory tutorial to Git on Linux

In this artcile you will learn how calculate Fibonacci sequence with using C++ function. The Fibonacci sequence starts with 0 and 1 where the the following number is always a sum of the two preceding numbers. For example, 0,1,1,2,3,5,8 and so on.

In this tutorial you will learn:
  • How to compile Fibonacci C++ program
  • How to run Fibonacci C++ program

If you've ever tried to come up with a catchy domain name, you know how annoying it can be to keep checking to see if a certain name is available. Fortunately, on Linux we can make the task a little easier on us by using the whois command. When a domain is available, the output from whois will let us know that it's not able to find any information for that domain.

It's easy enough then to put this functionality into a Bash script, which helps to automate checking lots of different TLDs (Top Level Domains, like .com, .net, .org, etc).

In this guide, we'll show how to check domain name availability from the command line on Linux. Then, we'll give you a simple Bash script that you can copy onto your own system and check for lots of domains at once. Read on to learn how.

In this tutorial you will learn:
  • How to install whois on major Linux distros
  • How to check for domain name availability with whois command
  • Bash script for checking domain name availability

The ls command on Linux is one of the most essential command line tools that all users should familiarize themselves with. When navigating directories on the command line, the ls command is used to list the contents of a directory. Without this command, we can't know what files are on our system. Once you learn how to use this command, the knowledge will carry over to any Linux distribution, since ls is a longtime staple on all of them.

ls becomes even more handy once you learn some of its options. Newcomers to Linux may intuitively think that browsing files in the GUI would be infinitely easier than fiddling with the command line. But this couldn't be further from the truth. Mastering the ls command will allow you to list directory contents and find files a lot more efficiently than any GUI tools. It can also be utilized in Bash scripting to help other tools manipulate files.

In this guide, we'll introduce you to the ls command through various examples and scenarios on a Linux system. By the end, you'll have a good understanding of how it works, and be able to use it for all of your file listing needs. At the end of the guide, we have an exercises section to help make sure you've learned some of the most essential aspects of the command.

In this tutorial you will learn:
  • How to use the ls command with examples
  • Frequently used options with the ls command
  • ls command exercises

Files with the xlsx extension have been formatted for Microsoft Excel. These documents contain columns and rows of data, just like those found in Google Sheets or LibreOffice Calc. This data can be stored as CSV (comma separated values), making it easily readable by various applications or even plain text editors. Due to their proprietary nature, Excel spreadsheets can be difficult to open on Linux systems, making CSV files a much more cross compatible format.

In this guide, we'll show you a few different methods to convert Excel spreadsheets into comma separated files. This can be done from the command line, or you can open the spreadsheets with LibreOffice and resave them in the desired format, as you'll see below.

In this tutorial you will learn:
  • How to convert xlsx files to csv via command line with ssconvert
  • How to convert xlsx files to csv via command line or GUI with LibreOffice

If you have a lot of tab characters inside a text document or program file, they can be annoying because of how they're represented differently in various text editors. For example, when you send your code to someone else, is it going to display the same way on their screen as it did on yours? Tabs are a bit unpredictable in this respect, and spaces are a much safer bet.

In this guide, we'll show how to replace all the tab characters inside a file with spaces on Linux. We can use various Linux commands to do the job for us, which we'll go over below. Depending on your situation and the file in question, some commands may be more suitable than others.

In this tutorial you will learn:
  • How to replace tab characters with spaces

Developers interested in the Android mobile operating system are able to use the Android SDK and various IDE software to code applications. These apps can then be made available and marketed to Android users around the world.

There are a lot of choices when it comes to programming Android applications. Your coding environment can involve a Linux system and a variety of different IDE programs to facilitate all of the software development. The trouble here is that each Linux distribution will often have a different set of requirements to run the sofware, and a separate list of steps that need to be followed.

In this guide, we'll go through the step by step instructions to install Android Studio - which is one of the most popular Android IDEs - on a Linux system. This will work on any distribution because we'll be using Snap package manager to manage the installation. Love it or hate it, the Snap package manager gets your system ready for Android development very quickly, by handling all the dependencies and working identically on any distribution you're running, whether it be Ubuntu, Debian, Red Hat, CentOS, AlmaLinux, openSUSE, or any other type of Linux system.

Follow along with us below as we setup Snap package manager, install Android Studio, and then program a Hello World Android application to verify that everything is working properly.

In this tutorial you will learn:
  • How to setup Snap package manager
  • How to install Android Studio and SDK packages
  • How to create a Hello World test application
  • How to run an Android application on an emulated device

Removing duplicate lines from a text file can be done from the Linux command line. Such a task may be more common and necessary than you think. The most common scenario where this can be helpful is with log files. Oftentimes log files will repeat the same information over and over, which makes the file nearly impossible to sift through, sometimes rendering the logs useless.

In this guide, we'll show various command line examples that you can use to delete duplicate lines from a text file. Try out some of the commands on your own system, and use whichever one is most convenient for your scenario.

In this tutorial you will learn:
  • How to remove duplicate lines from file when sorting
  • How to count the number of duplicate lines in a file
  • How to remove duplicate lines without sorting the file

Visual Studio Code or VSCode is a text editor developed by Microsoft that supports many popular programming languages such as Go, Java, JavaScript, Node.js, Python, C and C++. It is a directory based, language agnostic source code editor which focuses on directories rather than projects and has many extensions available for it. VSCode’s feature set includes bracket matching, syntax highlighting, code folding, linting, debugging, and built in version control via Git, Subversion or Perforce. Ever since the initial release of VSCode in 2015, it has become an increasingly popular programming tool amongst users of all desktop operating systems including GNU/Linux.

One of the many benefits of using Linux over Windows is the fact that the user doesn’t have to send telemetry to Microsoft. Because VSCode is built on open source and the source code is released under the MIT license, it is seen by many in the open software community as a welcome addition. In fact, many in the community who never would have considered installing any other software from Microsoft may be tempted to try out VSCode. Microsoft wants the Linux community to use VSCode. Microsoft even provides easily installed .deb and .rpm packages in addition to a distribution independent snap package. In fact, we previously covered how to install Visual Studio Code on Ubuntu 20.04 desktop using snap. These official binary versions of VSCode have proprietary elements and built in Microsoft telemetry which is enabled by default. According to Microsoft’s privacy statement, this telemetry is also shared with their affiliates and subsidiaries. Although it is possible to disable the telemetry, simply opening the application to do so may send telemetry to Microsoft because it is activated by default. Additionally, the possibility remains that a future update could reactivate the telemetry.

Is there any way to use VSCode without Microsoft’s proprietary elements and telemetry? As it turns out, there are two options. The first option is to build VSCode from the open source MIT licensed source code hosted on GitHub. Historically, when you build VSCode from source the telemetry and proprietary elements that Microsoft adds to the binaries are not included. The second option is to install a pre-built binary provided by the VSCodium project, who essentially build a telemetry free MIT licensed version of VSCode for you. We will explore both options in this article.

In this tutorial you will learn:

  • How to download and build an open source version of VSCode from GitHub and ensure that telemetry is disabled.
  • How to add a VSCodium repository and install an open source telemetry free version of VSCode with your package manager
  • How to directly download, and verify, the latest release of VSCodium.

The Bash shell is the most popular shell on Linux systems, and to use the shell efficiently, you need a little knowledge about Bash shell redirections. This is also an essential step in learning Bash scripting.

In this guide, we'll show how to redirect standard output and standard error to the same file on the Bash shell command line. This will include several examples so you can pick the right method in any scenario.

In this tutorial you will learn:
  • How to redirect standard output and standard error to same file
  • How to redirect standard output and standard error to file and terminal
  • How to redirect standard output and standard error to /dev/null

Environment variables are part of the Linux system shell that contain changing values. They help facilitate scripts and system programs, so that code can accommodate a variety of scenarios. Unlike regular shell variables, environment variables can be accessed system-wide, by any user or process.

Let's look at a very simple example to see how environment variables work and why they exist. There are many system programs and user made scripts that need to access a current user's home directory. This can be done reliably through the HOME environment variable. Therefore, a script that contains the following line can be used by any user on the system and it will generate the same result.

$ echo $SHELL > $HOME/current-shell.log

$ cat $HOME/current-shell.log
/bin/bash

In this guide, we'll show how to list all the environment variables on a Linux system, as well as set new ones. Setting new environment variables can either be done temporarily, or permanently if you need them to survive a reboot. We'll show instructions for both methods below.

In this tutorial you will learn:
  • How to list environment variables on Linux
  • How to set a temporary environment variable on Linux
  • How to set a permanent environment variable on Linux

The Bash shell is the most popular shell on Linux systems, and to use the shell efficiently, you need a little knowledge about Bash shell redirections. This is also an essential step in learning Bash scripting.

In this guide, we'll show how to append text or command output to a file on the Bash shell command line. This will include several examples so you can pick the right method in any scenario.

In this tutorial you will learn:
  • How to append text or command output to a file
  • How to append and view command output at the same time
  • How to append multiple lines of text to a file
Appending text to a file in Bash on Linux
Appending text to a file in Bash on Linux

Wordpress is probably the most used CMS in the world (it is estimated that almost 40% of all websites are built using the platform): it is very easy to install and use, and allows even non-developers to create website in few minutes. Wordpress has a very large plugin ecosystem; one of the most famous is Woocommerce, which allows us to turn a website into an online store in few steps. The plugin makes use of the Wordpress REST API infrastructure; in this tutorial we will see how to interact with the Woocommerce API using the Python programming language, showing how to list, create, update and delete products and categories.

In this tutorial you will learn:

  • How to generate Woocommerce REST API credentials and enable pretty permalinks
  • How to interact with the Woocommerce REST API using Python and the woocommerce package
  • How to get information about the existing Woocommerce categories, create, update and delete them
  • How to get information about the existing Woocommerce products
  • How to create simple and a variable products with variations
  • How to update and delete a product
woocommerce-rest-api

FIND LATEST LINUX JOBS on LinuxCareers.com
Submit your RESUME, create a JOB ALERT.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in: