Linux Resources
- Home
- Linux Resources
This article covers how to use the filter() function in Python. In tact, the filter() function extracts elements from an iterable (list, tuple etc.) for which a function returns True.
filter() Arguments
The filter() function takes two arguments:
This article covers how to use the round() function in Python. In fact, the round() function returns a floating-point number rounded to the specified number of decimals.
round() Return Value
The round() function returns the:
This article covers how to use the htop tool in Linux. In fact, the htop command is an interactive process viewer for Linux / Unix systems. It is a text-mode application and requires the ncurses library.
How to Install and Use Htop in Linux System ?
To install Htop on a Linux operating system distribution of your choice, reference one of the following installation commands:
$ sudo apt-get install htop [On Debian, Ubuntu and Mint]
$ sudo yum install htop [On RHEL/CentOS/Fedora and Rocky Linux/AlmaLinux]
$ sudo emerge sys-process/htop [On Gentoo Linux]
$ sudo pacman -S htop [On Arch Linux]
$ sudo zypper install htop [On OpenSUSE]
This article covers how to use the host command in Linux. In fact, host performs DNS lookups, converting domain names to IP addresses and vice versa. When no arguments or options are given, host prints a summary of its command line arguments and options.
This article covers the complete procedure for installing the PHP OPcache on your Ubuntu 20.04 LTS Focal Fossa system. In fact, OPcache is an Apache module for the PHP interpreter which is used to increase performance by storing precompiled scripts in shared memory space. It basically removes the need for PHP to load and parse scripts on each request.
How to Install and Configure PHP OPcache with Nginx ?
1. First, install the Nginx, PHP and other PHP extensions with the following command:
$ apt-get install nginx php php-fpm php-cli php-opcache php-mysql php-zip php-gd php-mbstring php-curl php-xml -y
2. Once all the packages are installed, verify the PHP version with the following command:
$ php -version
3. Next, you will need to enable the PHP OPcache by editing php.ini file.
$ nano /etc/php/7.4/fpm/php.ini
Uncomment the following lines:
opcache.enable=1
opcache.memory_consumption=128
opcache.max_accelerated_files=10000
opcache.revalidate_freq=200
Next, Save and close the file then restart Apache service to apply the changes:
$ systemctl restart nginx php7.4-fpm
4. You can now verify the PHP OPcache installation with the following command:
$ php -i | grep opcache
This article covers the complete procedure to install and configure the latest version of the FTP Server on the Linux Mint system. In fact, VSFTP (very secure FTP) is a secure FTP protocol which encrypts information transfer between systems.
To Install VSFTPD on Linux Mint 20, Simply Run the following commands to install VSFTP server on Linux Mint 20:
$ sudo apt-get update
$ sudo apt install -y vsftpd