Categories
Linux Servers

Fixing kernel error AMD-Vi IO_PAGE_FAULT – Linux

Without any clear reason, today an error appeared on my home server, in fact the server crashed and did not respond to any commands, the only option was the hardware reset, from the button! The server is a HTPC, with remote access (headless server), based on a Ryzen 2400G processor, 16GB Ram, 1xNVMe, 1xSSD, 4xHDDs […]

Categories
Linux Useful

Hot to find your Linux Kernel Version

Below are the usual 4 Commands to Find Linux Kernel Version uname uname -r # find Linux kernel version uname -a # for all information related to kernel version, lsb_release lsb_release -r # for the exact version lsb_release -a # for all information related to the Ubuntu version, lsb_release -sr # distribution version number: proc/version cat /proc/version # details about for […]

Categories
Linux Servers Useful

How to Update Linux Kernel to 5.5.0

To upgrade to linux 5.5.0 kernel, you can perform the following steps: 1st) Download the following files to an empty folder (for 64bit & generic kernel): wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.5/linux-headers-5.5.0-050500_5.5.0-050500.202001262030_all.deb wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.5/linux-headers-5.5.0-050500-generic_5.5.0-050500.202001262030_amd64.deb wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.5/linux-image-unsigned-5.5.0-050500-generic_5.5.0-050500.202001262030_amd64.deb wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.5/linux-modules-5.5.0-050500-generic_5.5.0-050500.202001262030_amd64.deb 2nd) execute the command: sudo dpkg -i *.deb 3rd) In the end, after the installation has taken place, all you have […]

Categories
Linux Servers

Stop Random Standy/Sleep in Ubuntu-Linux Server

My Ubuntu Server 18.04, is without a monitor / keyboard connected (headless server) and has been running for several years, but today I updated to the latest kernel version because I couldn’t find the solution to a problem that suddenly appeared and without any apparent cause: AMD-Vi IO_PAGE_FAULT error. From what I found online, it […]

Categories
Linux Useful

Automatic REBOOT if needed after apt-get upgrade – Linux

Sometimes after the execution of the apt-get upgrade command is finished, a restart is required, but this is not displayed after the command is completed, but you have to do it manually. To do this, you need to check the existence of the /var/run/reboot-required file and then restart the system if the file exists. To […]

Categories
Linux Useful

Change the extension of multiple files in Linux

1). Using Linux find command Using find command to rename all .oldext files under directory structure with a new extension: .newext find . -type f -name “*.oldext” -exec rename ‘s/\.oldext$/.newext/’ ‘{}’ \; 2). Using Linux find command, but in a different approach for f in `find . -iname ‘*.oldext’ -type f -print`;do mv “$f” ${f%.oldext}.newext; […]

Categories
Linux Useful

du – Get the Size of a Folder in Ubuntu Linux

The linux du command displays the size of file space used by the specified files or folders. If the specified path is a directory (folder), du summarizes disk usage of each subdirectory in that directory. Otherwise, du reports the disk usage of the current working folder. To get the total size of the /srv folder, […]

Categories
Linux Security Servers

Install OpenVPN, DNSCrypt and Pi-Hole – Ubuntu 20

Step by step: Install OpenVPN + Pi-Hole ad-blocker + DNSCrypt-proxy for DoH and DNSSEC Step 1. Update the system: sudo apt update sudo apt upgrade Step 2. Install OpenVPN: wget https://git.io/vpn -O openvpn-install.sh chmod 755 openvpn-install.sh sudo ./openvpn-install.sh Generated opvn file can be used with an OpenVPN client in PC or cell phone. It can be […]

Categories
Linux

Detach script/command in Linux – Easy Way !

Hot to start and detach bash script (or command) in linux from the command line: setsid nohup monitor.sh & detach script/command with custom log: setsid nohup monitor.sh &>/tmp/monitor.log & And to check the result, use a linux command that shows the process hierarchy: [email protected]:/usr/local/bin# ps -efj –forest

Categories
Linux

Kill Process in Linux by PID, Name or Group

Kill a Process in Linux from command line using kill command: kill process by name: kill $(ps aux | grep ‘process_name’ | awk ‘{print $2}’) kill process by ID kill -9 PID Kill all descendant/recursively processes The easy way to do this in a shell script is using pkill command: pkill -TERM -P 123456 where […]