Home » Articles by: Stefan Durand

How to Check the Current PHP Version

PHP Logo

Almost eight out of ten websites use PHP (according to W3Techs) and most are WordPress sites – yet 64% are using old versions no longer officially supported. Considering the latest versions are faster and safer from hacking, it makes sense for every webmaster to keep on top of updates. At the time of writing, the latest version of PHP is 7.4.8, and version 8.0.0 is in alpha. The catch with upgrading is that new conflicts can arise, usually from code that has only been tested … Read more

Home » Articles by: Stefan Durand

Postgresql: show tables, show databases, show columns, describe table

PostgreSQL is one of the best database engines for an average web project and many who moves to psql from MySQL (for example) often ask the following questions: What is the analog of “show tables” in Postgres? How can I get the list of databases in Postgres like “show databases” in MySQL? In this quick tutorial, we’ll answer these questions, along with some other common commands which are useful. PostgreSQL doesn’t work with original MySQL commands, but it gives similar functionality with its own commands: … Read more

Home » Articles by: Stefan Durand

Git: How to Remove a Remote

git logo

What Is A Git Remote? A remote within the control system Git is a common repository utilized by all users when exchanging changes that have been made. The git remote is essentially a pointer referring to a cloned version of the user’s project that is typically hosted remotely, such as on another network or a remote server. The remote repository is given the shorthand convention ‘origin’, which you may see referenced in the commands. If you’re working within a group on a project, multiple remotes … Read more

Home » Articles by: Stefan Durand

The Zip Command in Linux: How to Zip Files and Directories

zip files and directories in linux

If you’re looking to archive your files and directories, regardless of your OS, “zip” is the format that is most popular and supported by the largest number of clients and operating systems. In this tutorial, we’ll go over how to use the applications in Linux to compress files and directories. The zip file format supports lossless data compression. Its origins go back to 1993, designed by Phil Katz of PKWARE and Gary Conway of Infinity Design Concepts. Compressing your data has multiple benefits, namely: less … Read more

Home » Articles by: Stefan Durand

Why is the Linux Logo a Penguin (Tux)?

The Beginning The use of a Penguin as logo/mascot for Linux was discussed first in early 1996 by several people in the linux-kernel mailing list. The idea of such a mascot came from Alan Cox first. Among many other suggestions made by different people, there were parodies of other operating system logos, sharks, or even eagles. You can find them here, and here’s a couple below: In May, 1996, Linus Torvalds casually mentioned that he was rather fond of penguins and it stopped the debates … Read more

Home » Articles by: Stefan Durand

Linux Restricted Shells: rssh and scponly

security

Restricted shells like rssh and scponly give sysadmin the possibility to limit the operations that Linux user can do, for example you can create user that will be allowed to copy files via scp but won’t be permitted to login into system’s command line. This is quite important security feature that should be considered by every sysadmin to prevent unauthorized activity by users for example over SSH. If you have some online storage that is used for uploading backup data over scp or rsync/ssh from remote hosts then … Read more

Home » Articles by: Stefan Durand

Track file changes using auditd

command line

Most of Linux distributions comes with Linux Auditing System that makes it possible to track file changes, file accesses as well as system calls. It’s pretty useful functionality for sysadmins who wish to know who and when accessed and/or changed sensitive files like /etc/passwd, /etc/sudoers or others. Daemon auditd that usually runs in background and starts after reboot by default logs those events into /var/log/audit.log file (or into other file if different syslog facility is specified). The common usage is to list all files which should … Read more

Home » Articles by: Stefan Durand

Limit CPU usage of Linux process

CPU not matter anymore

cpulimit is a small program written in C that allows to limit CPU usage by Linux process. Limit is specified in percentage so it’s possible to prevent high CPU load generated by scripts, programs or processes. I found cpulimit pretty useful for the scripts running from cron, for example I can do overnight backups and be sure that compression of 50GB file via gzip won’t eat all CPU resources and all other system processes will have enough CPU time. In most of Linux distributions cpulimit … Read more

Home » Articles by: Stefan Durand

Top 5 Password Managers for Linux

keepassx

In this post you will find set of password managers for Linux which provides secure storage for your passwords for sensitive data. If you still keep the passwords in plain text then you must consider one of available password managers so this article is for you. KeePassX KeePassX has been a very popular and famous password manager for Linux for a very long time and still trusted by pretty big number of users. When user launches the KeePassX password manager first it requires to set … Read more

Home » Articles by: Stefan Durand

Grub Fallback: Boot good kernel if new one crashes

grub featured

It’s hard to believe but I didn’t know about Grub fallback feature. So every time when I needed to reboot remote server into a new kernel I had to test it on local server to make sure it won’t panic on remote unit. And if kernel panic still happened I had to ask somebody who has physical access to the server to reboot the hardware choose proper kernel in Grub. It’s all boring and not healthful – it’s much better to use Grub’s native fallback feature. … Read more