How to clear DNS cache everywhere
All the ways and places to clear DNS cache
All the ways and places to clear DNS cache
Quickly add apt-proxy to /etc/hosts
Create a floppy disk image for use with 86box and others
Create a local dnf repository from a directory of packages.
Push an empty Git commit in order to trigger a pipeline
Fixing missing libraries when running GOG games on Linux
I often find myself commit changes to main that I should of put in a different branch. This is especially difficult when using any of the git forges that have main protected. git push origin main:feature-branch The above is fairly self-explanatory. After we've commited our changes to the local main branch, we'll push those to the remote feature-branch. From here you can open a merge request to…
How to create a firewalld service definition for Plex Media Server
Using cURL only print headers and not entire page content
Delete lines in Vim beginning with a specific character like the hash or blank lines
Using grep --line-buffered to filter tail
Use CTRL+] and q to end an active telnet session
Use QEMU monitor to swap floppy or CD images
Enabling Port Forwarding during an active SSH session.
Notes on install Webmin on AlmaLinux
Determine Raspberry Pi model from command line
When connected to a service module you need to press Ctrl+Shift+6, then X in order to go back to the host router.
With systemd, it is easy to configure a service to automatically restart when it's crashed.
When using cloud-images from various distrobutions, sometimes the qemu-guest-agent isn't installed. Using virt-customize you config modify the image to include this package as well as enable it boot. $ virt-customize -a /path/to/image --install qemu-guest-agent --run-command '/usr/bin/systemctl enable qemu-guest-agent' The guest should not be running when you do …
Examine a single certificate Examine a file that contains multiple certificates Verify a certificate is valid using a specific root. Check that the certificate, and chain, being served is valid Just writing down some common openssl command I often find myself using. One day this collection might be more complete …
If you have a private SSH key but need to regenerate the public key again, use ssh-keygen with -y . This option will read a private OpenSSH format file and print an OpenSSH public key to stdout. ssh-keygen -y -f ~/.ssh/id_ed25519 > ~/.ssh/id_ed25519.pub Enter passphrase: This will save the …
netboot.xyz lets you PXE boot various operating system installers or utilities from a single tool over the network. — netboot.xyz Enable TFPT service on Synology DSM Control Panel > File Services > Advanced Check "Enable TFTP service" Select TFPT root folder Apply You can edit advanced settings to enable logging, configure …
After many months of using Synology Storage Analyzer to create automatic reports recently these have been failing with the error Storage Analyzer: A data write error occurred while generating the usage report. A bit of searching online and this seems to be common for a few reasons. In my case …
Both grep and cat can include line numbers. With cat : :::text [root@mx1 ~]# cat -n /etc/hosts 1 # Loopback entries; do not change. 2 # For historical reasons, localhost precedes localhost.localdomain: 3 127.0.0.1 localhost localhost.localdomain localhost4 4 ::1 localhost localhost.localdomain localhost6 5 # See hosts(5 …
Add an override. sudo systemctl edit systemd-resolved [Service] Environment=SYSTEMD_LOG_LEVEL=debug Make changes active. sudo systemctl restart systemd-resolved View logs. journalctl -u systemd-resolved -f And when you're done, undo all these changes. sudo systemctl revert systemd-resolved sudo systemctl restart systemd-resolved`
This is a work in progress. Introduction In this example, s1.prod.example.com is a real server and an IPA client. The name ipa.example.com is an alias. The same process can be repeated to allow additional real hosts to retrieve a keytab for ipa.example.com , simply …
I use healthchecks.io to monitor several cronjobs and this works great. Recently I have been using systemd timers instead of cronjobs but wanted to continue to use healthchecks with them. I accomplished this using ExecStartPre and ExecStartPost in the service file. To add these checks to the dnf-automatic.service …
End a hung ssh sessions with ~ + . . In practice this doesn't also ways work for me. I've found that sometimes you must press Enter a couple of times before ~. seems to do anything.
Just a list of the 3rd party plugins I have installed in Octoprint. Keeping these here for my own future reference. ABL Expert Plugin Bed Visualizer DiscordRemote Filament Manager OctoDash Companion Octolapse PrettyGCode Print History Plugin PrintTimeGenius Slicer Thumbnails UI Customizer
You can view markdown files using any file viewer. However, to get a slightly more pleasent view you can use pandoc to first convert to HTML and then render that with either lynx or w3m (any any other browser.) Examples: # Using pandoc with Lynx $ pandoc file.md | lynx -stdin # Using …
There are times when your home directory might not be available. This can be due to your homedir coming from LDAP or another network service and the local directory not being available. When logging in you'll see something similar to Last login: Mon Sep 13 21:03:37 from foo …
Yum keeps a local cache. To use yum with only the cache use yum -C or yum --cacheonly . Reference man yum
Show the fingerprint of an SSH key $ ssh-keygen -l -f ~/.ssh/id_rsa The default hashing is sha256, however it might be more useful to see the fingerprint in md5. $ ssh-keygen -l -f ~/.ssh/id_rsa Less useful, but sometimes fun, is showing the randomart assocated with the key ~ $ ssh-keygen -l -v …
$ chronyc -a 'burst 4/10' $ sleep 5 $ chronyc -a makestep References chrony - chronyc(1)
virt-customize can be used to customize a virtual machine image by installing packages, editing configuration files, and so on. This is done by modifying the disk image in place. Update the template Run yum update to update the packages already installed in the template to their latest versions. $ virt-customize --connect …
Prepare the clone Use the virt-sysprep command to reset a virtual machine. The virtual machine must be shut down before you use this command. virt-sysprep --connect qemu:///system -d centos7-gold Create the clone Use the virt-clone command to create a clone of an existing virtual machine. virt-clone --original centos7-gold --name …
Configuring libvirt First libvirt needs to be configured. Modify the default network using virsh net-edit default. $ sudo virsh net-dumpxml default <network connections='1'> <name>default</name> <uuid>3a3627c2-15a7-4e7f-b7b6-0c2310ba9427</uuid> <forward mode='nat'> <nat> <port start='1024' end='65535'/> </nat> </forward> <bridge name='virbr0' stp='on' delay='0'/> <mac address='52 …
If the journal is configured to archive entires these can take up unnecessary disk space when not properly maintained. The current disk usage can be seen with journalctl --disk-usage . This includes both active and archived journal files. Clear journal entries older then X number of days $ journalctl --vacuum-time=5d Clear …
How to reset an unknown root password using rd.break on RHEL 7. Start by booting until the GRUB2 menu appears then edit the boot loader menu with the e key. Find the line beginning with linux and make then follow these steps. add rd.break run mount -o remount …
Using screen you can connect to any serial device in /dev. A typical USB-to-RS-232 adapter will usually be /dev/ttyUSB0. A physical serial port will usually be /dev/ttyS0. screen /dev/ttyUSB0 9600
Ping nodes on the local network segment using multicast 1 ping6 -c2 -I <interface> ff02::1 Then, view IPv6 neighbors ip -f inet6 neigh References https://en.wikipedia.org/wiki/Multicast_address
To renew an expiring, or extend the expiration of a gpg key edit the key and set a new expiration date. gpg --edit-key <keyid> command> list command> key [keyid] command> expire command> save Where keyid above is the key that is expiring.
Use ntpd -gc to start the NTP daemon and set the time regardless of what the offset between the local and remote clock is.
Show all iptables rules and include line numbers iptables -L INPUT --line-numbers Replace iptables rule at a specific line number iptables -R X INPUT <new rule here>
The pvresize command can be used to grow an existing physical volume so long as you grow the parition on the underlying device. Use fdisk -l /dev/sdc1 to find the start sector of the partition. Delete existing partition and create a new partition with the same start sector. Use …
# a config file for sSMTP sendmail. # The user that gets all mail for userids less than 1000. If blank, address # rewriting is disabled. Root=roots-mail@example.com # the smarthost or relay or ... Mailhub=smtp.fastmail.com:465 # TLS Config UseTLS=YES UseSTARTTLS=NO RewriteDomain=example.com # The full hostname Hostname …
These are my notes on getting caff configured and working in order to send signed keys after the OhioLinuxFest keysigning. All of this was done on a Fedora 24 Workstation using only the standard repositories. Installation The pgp-tools package provides caff. It can be easily installed with yum. I also …
Packages and Services On RHEL7Server the OpenIPMI and ipmitool are necessary to configure and use IPMI. $ yum install OpenIMPI ipmitool Networking Configure a static ip address on the first port. For dynamic configuration set ipsrc to dynamic. $ sudo ipmitool lan set 1 ipsrc static $ sudo ipmitool lan set 1 ipaddr …
After failing to update the initrd after making changes to the plymouth boot I was unable to boot into the kernel. The yum reinstall fixed this $ yum reinstall kernel However, this doesn't always work. If yum feels the kernel is already installed and healthy this will return 'nothing to do' …
Two changes are needed to have dovecot update lastlog when a user logins with either imap or pop3. In /etc/dovecot/cond.d/auth-system.conf.ext enable PAM sessions passdb { driver = pam args = session=yes dovecot Then, enable the lastlog module in the dovecot PAM configuration at /etc/pam.d …