New answers tagged

0 votes

rpm database lost, how to proceed?

You download and install using rpm the centos-release-XX-XX.noarch.rpm package. find /usr /etc -type f -print0 | xargs -0 -P$(nproc) dnf --cacheonly whatprovides | sort -u > /tmp/packages.txt You ...
user avatar
2 votes

What should be the equivalent apport package for CentOS 8

CentOS/RHEL has a similar tool called ABRT. Its primary function is reporting the issues to RH bugzilla (or customer portal), but you can also configure it to send an email or just let it collect logs ...
user avatar
3 votes

Tried to open external harddrive img file

Use losetup to associate the image file with a free /dev/loopN device: losetup -P -f /mnt/usb/vdisk1.img This will report the name of the actual loop device used: if there are no other loop devices ...
user avatar
  • 66.8k
1 vote

Tried to open external harddrive img file

Use losetup to create a loop device from the image losetup -P -f /mnt/usb/vdisk1.img the content of the image will be available as /dev/loopX, if the LVM structure on it isn't auto activated use vgs ...
user avatar
0 votes

Yum repository giving 404 on primary_db

Check https://yum.example.com/yum/EPEL/7/x86_64/repodata/repomd.xml. The links in that file are most likely outdated and need to be updated by the repo admin.
user avatar
0 votes

Can't monitor Kickstart post-install log

The problem is with carriage return if you use echo "message" >/dev/tty1 Try instead echo -e "message\r" >/dev/tty1
user avatar
  • 1
2 votes
Accepted

Why CentOS converts ATA bus to scsi bus?

This is how the Linux kernel handles Parallel ATA (IDE). Initially, there was a set of IDE-specific drivers, and IDE drives appeared as hda etc. But when Serial ATA came on the scene, Jeff Garzik ...
user avatar
1 vote
Accepted

How to update, instead of flush and re-write, iptables rules

If there are specific rules that need to be updated regularly, I would put them in a separate chain, calling that chain from INPUT in an appropriate slot iptables -N mychain # Create ...
user avatar
  • 88.9k
1 vote

How to update, instead of flush and re-write, iptables rules

Replacing Rules is possible. Here is an example: First you can create a rule at the top (first) position with this command : iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT Rules can be specified to ...
user avatar
1 vote
Accepted

Change prompt colour inside midnight commander?

You cannot make the prompt colorized. But mc has an ability to change color themes, look in Options/Appearance. There are many themes already exist and you can choose one you like the most. Or create ...
user avatar
  • 1,163
0 votes

File contains no section headers on Centos

As a safer solution, it's just enough to rename that repo file: # cd /etc/yum.repos.d/ # mv <repo_file>.repo <repo_file>.repo.orig
user avatar
2 votes

copy network configuration from one linux machine to another

No. that allows it to directly access certain URLs that I can only otherwise access through a VPN on other machines The most likely reason is that this machine's IP address (or at least the IP ...
user avatar
  • 4,225
0 votes

Firmware packages: What do they actually do?

refer to other people's answers, and online docs try to compare it with related things which linux users may often see. //May not be completely accurate, improvements are welcome linux-firmware ...
user avatar
  • 207
6 votes
Accepted

Prevent shell script from hanging on a line

Instead of piping df's output into grep (which causes df to query all mounted filesystems, even those which are not responding - e.g. a hung NFS mount), give df the fileystem(s) you want info on as ...
user avatar
  • 66.6k
1 vote
Accepted

What should be the equivalent logrotate script for CentOS 8

I suggest you use what the base CentOS httpd package uses in its httpd.logrotate: /var/log/httpd/*log { missingok notifempty sharedscripts delaycompress postrotate /bin/...
user avatar
  • 22.9k
0 votes

/var keeps filling due to yum cache

There are several ways to deal with issues like this, including: Increase the size of the /var partition (or the / partition if /var isn't a mount-point). If you're using LVM (or btrfs or zfs), this ...
user avatar
  • 66.6k
0 votes

Wireguard transfer of external ip address

Client ip 24.18.22.12 -> Wireguard host (98.XX.XX.XX) -> Internal web server (192.168.0.2) (Internal web server seen client ip original 24.18.22.12, no wireguard gateway) Well, you're doing NAT,...
user avatar
3 votes

blocking commands as non-root

You can create a directory in your home, create some files with the names of programs you want to restrict and prepend it to your $PATH. For example: $ mkdir ~/bin Create ~/bin/links with the ...
user avatar
2 votes
Accepted

How to troubleshoot a LDAP error 53 (WILL_NOT_PERFORM)?

The error you are encountering is coming from the Active Directory server itself. So the verbose error message, if it exists, is likely to be in the "Event Log" on the Active Directory ...
user avatar
0 votes

Why 7z not using enough CPU?

Mystery solved: 7za a -mx=9 -mmt=4 - note 4 threads although the VM has 3 vCPUs only. Now it uses 100% CPU. Helped by the 7z author: https://sourceforge.net/p/p7zip/discussion/383043/thread/15831e05/#...
user avatar
0 votes

Can I run a script on reboot once?

I have split the script to 2 different jobs. One is running OS update and reboot and another (an hour later) is whatever is needed for logs collecting/zipping.
user avatar
1 vote

Can I run a script on reboot once?

Not sure I understand what you need, but I see two ways to do what you described: Make a "proper shutdown" script. Manage logs from it, set the file-flags for the next run (which would be ...
user avatar
  • 1,163
2 votes
Accepted

How to use wildcard for files without extension

* means zero or more of any character, . means the single character dot. So *.* means any names with a(t least one) dot in there somewhere. On Unix-likes, the dot is just a regular character in ...
user avatar
  • 115k
3 votes

How to use wildcard for files without extension

* does mean zero or more characters so *.* means some characters, followed by a dot, followed by more characters, so will match foo.bar, foo. .bar, foo.bar.baz, but not foobar, because the dot in the ...
user avatar
  • 156
2 votes
Accepted

How to simulate +%100 CPU Usage for 1 process?

If you don't want to compile your own testing application which will use for example pthread_create(3) to create multiple threads, which will get each 100% CPU usage added to the process once they are ...
user avatar
  • 24.7k
0 votes
Accepted

CentOS - Find out which user spawned process after sudo su

You could use pstree -u ... This should show you the uid transitions. I just did a test against a box, launching top via su - user2 -c top .... |-sshd-+-sshd---sshd(user2)---bash---screen ...
user avatar
  • 5,548
-1 votes

How to Increase swap space in a CentOS VM

we can increase Swap with out LVM 1. dd if=/dev/zero of=/path/swapfile bs=<swapsizein gB> count=1 /path/swapfile ====> its the pathfile where available space is there and you can create ...
user avatar
0 votes
Accepted

Centos 8 vs Almalinux, is it okay to upgrade? A help to understand how to change OS

AlmaLinux is 1:1 with RHEL, CentOS 8.5 is no longer supported (as from 31/12/2021) and so as time goes on differences will appear. At the moment they are mainly bugfixes so there should be a ...
user avatar
  • 744
3 votes
Accepted

Install mailx on CentOS 9

According to Bugzilla Bug 2001537 "mailx -> s-nail replacement in CentOS Stream 9", mailx was replaced by s-nail. There's also a reference to the same in the Red Hat's "...
user avatar
  • 63k
0 votes

How to find the required dependency software on CentOS?

You can use the command yum deplist <package> to get all the depencies
user avatar
  • 162

Top 50 recent answers are included