How to Backup OpenVZ Containers with vzdump on CentOS

OpenVZ is a Linux-based Kernel virtualization technology developed by SWSoft for its commercial product Virtuozzo. The modified Linux Kernel and the system utilities are released under an OpenSource license. Vzdump is a shell-based backup program for OpenVZ virtual machines. It is made for containers that use the traditional "simfs" filesystem, it can not be used ... Read more

Get the disk health status with SMART monitor tools on Debian and Ubuntu Linux

Disk SMART status

Every current disk includes a built-in monitoring feature known as SMART that keeps track of faults. On Linux, there is a software package called smartmontools that may be used to query the SMART status of the disk to see if it will fail soon. Installation apt-get install smartmontools Usage First we need to know the ... Read more

How to prevent that a user deletes a file owned by root in his home directory

Even though a file is held by root and has 700 rights, if the root user saves it in another user's home directory or any other directory owned by another user, that user can remove the file. Example: root@workstation:/home/otheruser# ls -la total 8 drwxr-xr-x 2 otheruser otheruser 4096 Jul 28 11:52 . drwxr-xr-x 3 root      ... Read more

How to prevent a Linux system user from logging into the system

The shell setting in /etc/passwd determines whether a Linux system user may log in via the shell or over SSH. If you don't want a certain user to be able to log in, set the shell to /bin/false or /sbin/nologin. For the user "otheruser" on Debian and Ubuntu Linux, here's an example: usermod -s /bin/false ... Read more

Get a list of all virtual hosts which are defined in all apache configuration files

Have you ever looked in the apache config files to see where a website's virtual host is defined? The apache2ctl script has a useful option that could come in good here. When you execute the command, it should look like this: apache2ctl -S You'll obtain a list of all virtual hosts and default servers in ... Read more

Linux Basics: The gunzip command explained (with examples)

Linux Gunzip Examples

The gunzip command is a widely used command for uncompressing files which are made using the gzip utility. It decompresses files with the.gz or .tgz file extension. The command removes the compressed file. After decompression, the files retain their original extension. Gzip is a popular file compression algorithm that keeps the file’s original mode, ownership, ... Read more

10 Apt Command Examples You Must Know

apt command examples

The apt is the most powerful command-line utility for managing the packages such as installing packages, updating package info, upgrading packages as well as Linux kernel, and removing unused packages in the Linux Debian family. The apt command is a CLI package managing tool that is a combination of apt-get and apt-cache which is more ... Read more

How to download and extract a .deb package on Ubuntu or Debian Linux

Download .deb package

Sometimes you require a certain file from a Debian .deb package. For example, because you accidentally deleted a file. Or because the package's installation is faulty and it can't be restored without first adding the missing file. This FAQ explains how to extract the contents of a.deb file downloaded from the Debian or Ubuntu repository. ... Read more