phpinfo page on a Linux system

How to create phpinfo.php page

PHP developers and web server admins can use the phpinfo function to quickly see information about their installation of PHP. This can assist in debugging, seeing what version of PHP is installed, or seeing various configuration options.

On Linux systems, it’s common to make a phpinfo.php page after installing a LAMP server or LEMP server to make sure that PHP is working and to verify settings.

In this tutorial, we’ll guide you through the creation of a phpinfo.php page on your own system, as well as how to access this file afterwards.

In this tutorial you will learn:

  • How to create phpinfo.php page

Read more

Checking PHP version on Ubuntu Linux

How to check PHP version on Ubuntu

After installing PHP or an entire LAMP server on Ubuntu Linux, there are a few ways you can check to see what version you’re running at any time. This can help you stay up to date and develop web applications that adhere to newer coding standards and conventions, since PHP is still being developed.

In this guide, we’ll show you multiple ways to check the version of PHP on Ubuntu. Feel free to pick whichever method is most convenient for your situation.

In this tutorial you will learn:

  • How to check PHP version on Ubuntu

Read more

Changing SSH port on Linux

How to change SSH port on Linux

The default port for SSH on Linux systems is 22. There are a few reasons why you may want to change this to some other number. If multiple servers share the same IP address (behind a NAT configuration, for example) you usually can’t have them running SSH on the same port and expect to access them from outside the network.

The other big reason is security. Changing the SSH port would fall under “security through obscurity” which means that the security isn’t technically enhanced, but the SSH port has been obscured and isn’t as easy for attackers to access. In practice, this means that the thousands of bots scanning the internet for open SSH servers are a lot less likely to find yours.

In this article, we’ll take you through the step by step instructions of changing the default SSH port on Ubuntu Linux and CentOS Linux. Since Ubuntu is based on Debian, you can also apply the same instructions to other Debian based systems, like Linux Mint. CentOS is based on Red Hat, so its instructions can also be extended to Fedora and other similar Linux distributions.

In this tutorial you will learn:

  • How to change SSH port on Ubuntu and CentOS Linux

Read more

Excluding a directory from rsync transfer

Rsync: exclude directory

The rsync command on a Linux system can be used to synchronize the contents of two directories. By default, rsync will transfer all files and directories over to the specified destination. If there’s a subdirectory you wish to exclude from the transfer, rsync gives us two options for doing so.

In this tutorial, we’ll show two methods for excluding one or multiple directories from an rsync transfer. Follow along with the example commands below on your own system to configure a directory for exclusion.

In this tutorial you will learn:

  • How to exclude a directory in rsync command

Read more

Killing a process by name on Linux

How to kill process by name

How to kill a process on a Linux system is an essential thing for admins and users to know. The go-to method for this is usually with the kill command, which involves killing a process by its PID (process ID).

Sometimes, though, it’s more convenient to kill a process by name rather than going through the routine of locating its PID each time. There are two commands we can use to kill a process by name, those being killall and pkill.

In this tutorial, we’ll go over both killall and pkill commands and show examples for how they can be used to kill processes by name only.

In this tutorial you will learn:

  • How to kill a process by name with killall and pkill

Read more

Setting a cron job for every 5 minutes in crontab

How to set crontab to execute every 5 minutes

cron is the job scheduler in Linux systems that can execute commands or scripts at regular intervals. Each task scheduled in cron is called a cron job. The utility used for scheduling these jobs is called crontab.

A common cron job that Linux admins use on their systems is to execute a command or script every 5 minutes. In this guide, we’ll show you how to use crontab to setup a cron job that runs every 5 minutes.

In this tutorial you will learn:

  • How to set crontab to execute every 5 minutes

Read more

nslookup command on Linux

Nslookup Linux command

The nslookup utility can be installed and used on a Linux system to find out information about the DNS records for a domain or IP address. It’s particularly handy when troubleshooting DNS issues. A popular tool that also comes installed with nslookup is dig, which is similar but uses different resolvers. It’s a good alternative to nslookup, but nslookup is typically easier to use.

In this tutorial, we’ll guide you through the installation of nslookup on major Linux distributions and show various command line examples that you can use on your own system when you need to obtain DNS information.

In this tutorial you will learn:

  • How to install nslookup on major Linux distros
  • Nslookup command line examples

Read more

Ubuntu uninstall package Tutorial

Ubuntu Uninstall Package Tutorial

In the following Ubuntu uninstall package tutorial, we’ll take you through the step by step instructions for uninstalling a package on Ubuntu from both GUI and command line. We’ll also show you options for deleting or keeping the configuration files that are associated with a package. Use whichever method below that you find most convenient for your situation.

Read more

Installing TeamViewer on Linux

How to install TeamViewer on Linux

TeamViewer is used for controlling remote computers, online meetings, file transfers, and a few other things. Being that it’s proprietary software, it can be a little trickier to install it on a Linux system than most free and open source alternatives.

In this tutorial, we’ll guide you through the step by step instructions to install TeamViewer on most major Linux distributions.

In this tutorial you will learn:

  • How to install TeamViewer on Ubuntu, Debian, and Linux Mint
  • How to install TeamViewer on CentOS, Fedora, and Red Hat
  • How to install TeamViewer on Manjaro and Arch Linux

Read more

Deleting a local and remote Git branch

Git: delete branch

When working with Git, it’s common for projects to contain multiple branches. Over time, these branches may become irrelevant and need deleted. Other times, they change purpose and its necessary to rename the branch.

In this guide, we’ll show you the step by step instructions for deleting Git branches via the command line on a Linux system. We’ll show the process for deleting local branches as well as remote branches in the sections below.

In this tutorial you will learn:

  • How to delete local and remote Git branches

Read more

Renaming Git branch

Git: rename branch

When working with Git, it’s common for projects to contain multiple branches. Sometimes these branches change purpose over time or simply have a naming error, and in such cases it’s necessary to rename the branch.

In this guide, we’ll show you the step by step instructions for renaming Git branches via the command line on a Linux system. We’ll show the process for renaming local branches as well as remote branches and go over what you need to know to ensure a smooth transition.

In this tutorial you will learn:

  • How to rename local and remote Git branches

Read more

Creating and testing a symbolic link in Linux

How to create symlink in Linux

Symbolic links (also known as symlinks or soft links) are one of two types of links that you can create on a Linux system. If you’re just now learning about symbolic links, it may help to think of them as “shortcuts,” a term commonly used by Windows systems to represent basically the same thing.

Symbolic links are used to link to hard links. If you’re interested in learning more about hard links and how they compare to symbolic links, check our guide on creating hard and soft links. Suffice it to say that symlinks are just entries in the file system that point to files or directories. They’re mostly used for convenience.

In this guide, we’ll run through the step by step instructions of creating and removing symbolic links. You can follow along with our examples below on your own command line to get a feel for how they work.

In this tutorial you will learn:

  • How to create and remove symbolic links

Read more