Posts

Rasberry Pi 4 can't connect to WiFi ubuntu server [fixed]

Introduction In this tutorial, How to connect to WiFi ubuntu server on Rasberry Pi  4. Today, I buy Rasberry PI 4 new and install ubuntu 20.04 LTS. root@ubuntu:~# cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=20.04 DISTRIB_CODENAME=focal DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS" root@ubuntu:~#  after finish, Rasberry Pi 4 no identify ip address of wilfi. :D.  Rasberry Pi 4 can't connect to WiFi ubuntu server [fixed] The first, check network interface your system. ll -la /sys/class/net/ Create new file config for wifi " /etc/netplan/wlan.yaml" apply configure and reboot netplan apply The result, as below root@ubuntu:~# ll -la /sys/class/net/ total 0 drwxr-xr-x  2 root root 0 Jan  1  1970 ./ drwxr-xr-x 74 root root 0 Jan  1  1970 ../ lrwxrwxrwx  1 root root 0 Jan  1  1970 eth0 -> ../../devices/platform/scb/fd580000.ethernet/net/eth0/ lrwxrwxrwx  1 root root 0 Jan  1  1970 lo -> ../../devices/virtual/net/lo/ lrwxrwxrwx  1 root root 0 Apr  1  2020 wla

How to change the order of columns in the output

In this tutorial, How to change the order of columns in the output of `uniq -c` command. I use read the file and show the unique Name from the file. How many time this name of the file? The content of file as example below [HuuPV@DevopsRoles ~]$ cat devopsroles.txt  huu huu phan van dev devopsroles dev huu huu I use awk, sort uniq command to read file and show the unique Name as example below [HuuPV@DevopsRoles ~]$ cat devopsroles.txt | awk '{print $1}' | sort | uniq -c | sort -nr       4 huu       2 dev       1 van       1 phan       1 devopsroles Now, How to change the order of columns in the output of file [HuuPV@DevopsRoles ~]$ cat devopsroles.txt | awk '{print $1}' | sort | uniq -c | sort -nr | awk '{ print $2,$1}' huu 4 dev 2 van 1 phan 1 devopsroles 1 [HuuPV@DevopsRoles ~]$ cat devopsroles.txt | awk '{print $1}' | sort | uniq -c | sort -nr | awk '{ print $1,$2}' 4 huu 2 dev 1 van 1 phan 1 devopsroles Conclusion  How to change the order of

ntfsfix fix NTFS not mount from Linux

Today, I have not mount usb external USB into Fedora 32. External USB drive is NTFS formatted.  I will installed ntfs-3g  package for fedora as below: sudo dnf install ntfs-3g ntfsprogs The first, check your device address , you run this command as below sudo fdisk -l # or lsblk -f The output device is /dev/sd XY (where X and Y are the letter of the drive's device and Y is the partition number).  So in my case /dev/sdc1 is usb  drive external NTFS formatted. you will replace "device name" with your windows partition ( ex: /dev/sdb1 or /dev/sdd1 .v.v) How to do fix it Now, Open your terminal and run command to fix a Corrupted Windows NTFS Filesystem with Linux [HuuPV@DevopsRoles ~]$ sudo ntfsfix /dev/sdc1 Mounting volume... $MFTMirr does not match $MFT (record 0). FAILED Attempting to correct errors... Processing $MFT and $MFTMirr... Reading $MFT... OK Reading $MFTMirr... OK Comparing $MFTMirr to $MFT... FAILED Correcting differences in $MFTMirr record 0...OK Processing

How to Fix the semanage command not found in Centos 8

Introduction Encountering the "semanage command not found" error in CentOS 8? Learn how to fix it by installing the necessary package. This step-by-step guide will help you resolve the issue and get back to managing SELinux policies efficiently. If you're working with SELinux (Security-Enhanced Linux ) on CentOS 8, you may come across the error `bash: semanage: command not found`. This error indicates that the `semanage` command, which is essential for managing SELinux policies, is not available on your system. In this guide, we'll walk you through the steps to fix this issue by installing the required package. By the end of this tutorial, you'll have the `semanage` command up and running on your CentOS 8 system. Understanding the Error: "semanage command not found" What is the `semanage` Command? The `semanage` command is a part of SELinux, which stands for Security-Enhanced Linux. SELinux is a security architecture integrated into the Linux kernel, pro

How to Upgrade php version on Centos 7: A Comprehensive Guide

Introduction Learn how to upgrade PHP version on CentOS 7 from PHP 7.1 to PHP 7.4 in this detailed guide. Follow our step-by-step instructions to ensure a smooth upgrade process on your CentOS 7 server. Upgrading your PHP version on CentOS 7 is essential for ensuring that your server is secure, efficient, and compatible with the latest web applications. In this guide, we will walk you through the process of upgrading from PHP 7.1 to PHP 7.4. Whether you're running a personal blog, a business website, or a complex application, keeping your PHP version up to date is crucial. This tutorial will cover everything you need to know, from checking your current PHP version to enabling the Remi repository and updating your server. Why Upgrade PHP on CentOS 7? PHP is a server-side scripting language that powers a large percentage of websites on the internet. Each new version of PHP brings improvements in performance, security, and features. By upgrading to PHP 7.4, you can take advantage of

How to Install Specific Version of Package use YUM

Image
Introduction Learn how to install specific versions of packages using YUM on CentOS/ RHEL systems with detailed steps and advanced examples. YUM (Yellowdog Updater, Modified) is a powerful package management tool used in CentOS and RHEL-based systems. While installing the latest version of a package is straightforward, sometimes you might need a specific version. This guide covers the steps to install a specific package version using YUM, from basic to advanced examples. Understanding YUM and RPM YUM is a front-end tool for RPM (Red Hat Package Manager) that manages package installations, updates, and removals. RPM is the underlying package format used by Red Hat-based distributions. Understanding these tools is crucial for efficient package management. What is YUM? YUM simplifies the process of managing RPM packages by resolving dependencies and retrieving package metadata from repositories. It can install, update, and remove packages from your system. What is RPM? RPM is a low-level

How to resolve Error: rpmdb open failed In CentOS

In this tutorial, How to resolve Error: rpmdb open failed Error In CentOS. I was testing on nginx web server in Centos 7 VM Linode . Unfortunaely, I have install new package with yum command , I got this error message: error: rpmdb: BDB0113 Thread/process 3050/139803232012096 failed: BDB1507 Thread died in Berkeley DB library error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery error: cannot open Packages index using db5 -  (-30973) error: cannot open Packages database in /var/lib/rpm CRITICAL:yum.main: Error: rpmdb open failed It seemes like YUM broke down. I have not run any yum command. Solve problem, just do the following steps.   First backup the rpm database using command as root user: # mv /var/lib/rpm/__db* /tmp Run the following command: # yum clean all # yum update Clean backup # rm -i /tmp/__db* I hope this helps you.

How to Safely Remove old kernels in CentOS, RHEL and Fedora

Image
Introduction Learn how to safely remove old kernels on CentOS , RHEL , and Fedora to free up space and improve system performance. Step-by-step guide with best practices for maintaining your Linux system. As you continue to update and upgrade your Linux system, particularly on distributions like CentOS, RHEL, and Fedora, old kernels can accumulate over time. While these kernels are essential for booting your system, having too many can clutter your boot menu and consume valuable disk space. This guide will walk you through the process of safely removing old kernels from your system without risking stability, ensuring that your Linux machine runs smoothly and efficiently. Why Should You Remove Old Kernels? The Problem with Accumulating Kernels Linux kernels are the core of the operating system, responsible for managing hardware and system processes. Every time you update your system, a new kernel may be installed, but the old ones aren't automatically removed. This can lead to seve

How to install aide centos

Image
Introduction In this tutorial, we will explore how to install and configure AIDE (Advanced Intrusion Detection Environment) on CentOS. AIDE is a powerful tool designed for monitoring changes to files on the system, helping you detect unauthorized access and modifications.  Ideal for system administrators and security professionals, this guide will provide step-by-step instructions to ensure a successful setup of AIDE on your CentOS system. By the end of this tutorial, you will have a robust intrusion detection system in place, capable of providing detailed reports about the integrity of your files and system security. What does Aide mean AIDE is one of the most popular tools for monitoring the server changes in a LINUX based system.  It call as Advanced Intrusion Detection Environment. Install AIDE on Centos $ sudo yum install aide Check AIDE Version on your system $ sudo aide -v Configure AIDE $ sudo cp /etc/aide.conf /etc/aide.conf_BK Add lines not check /tmp and /pro

After install setup Fedora 30

Image
In this tutorial, Things to Do After Fresh Installation Fedora 30. Let do it! TO DO 1. Update your Fedora Always keep your system updated to the latest version of packages. $ sudo dnf update 2. Change the hostname $ sudo hostnamectl status # view current hostname $ sudo hostnamectl set-hostname --static "VivoS15" # set up new hostname 3. DNF tweak edit /etc/dnf/dnf.conf file $ sudo cp /etc/dnf/dnf.conf /etc/dnf/dnf.conf_ORIG [huupv@localhost ~]$ cat /etc/dnf/dnf.conf [main] gpgcheck=1 installonly_limit=3 clean_requirements_on_remove=True fastestmirror=true deltarpm=true 4. Install RPM fusion repository $ sudo dnf update --refresh $ sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm $ sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm 5. Player and codecs $ sudo dnf install youtube-dl vlc $ sudo dnf in