Install a User Service for a Podman Container
Create a User based service file:
cd ~/.config/systemd/user podman generate systemd CONTAINER-NAME > container-CONTAINER-NAME.service
Edit the service file and comment out the PID= section. The allows you to not have to create a new service file each time you re-create the container.
Reload the systemctl dameon as root:
systemctl dameon-reload
Enable/start the service up. Do this as the user it will run as:
systemctl --user enable container-CONTAINER-NAME systemctl --user start containre-CONTAINER-NAME
- Read more about Install a User Service for a Podman Container
- Log in to post comments
Best Way to Upgrade Fedora via Command Line
Upgrading via the Software application can have issues. If it has any issues at all it just fails leaving your system partially upgraded. This method is much safer and give you the ability to fix any issues as you find them. Also don't try to jump more than 2 versions at a time (ie. 35 to 37).
Before you even get started I like to backup my grub.conf file and remove all kernels accept the current one just to get a cleaner start:
- Read more about Best Way to Upgrade Fedora via Command Line
- Log in to post comments
Remove a File with a Dash (-) in the Beginning
To remove file in Linux that has a hyphon or dash in front of it just prefix it with "./". For example:
rm ./-testfile
- Read more about Remove a File with a Dash (-) in the Beginning
- Log in to post comments
View Logs of Last Boot
To use journalctl to view the logs of the last reboot use the following:
journalctl --boot=-1
This command is handy for viewing logs right before a crash. Do the above command then use shift-g to go to the bottom of the list.
- Read more about View Logs of Last Boot
- Log in to post comments
Find History of RPMs
To find the install history of a specific RPM do the following:
rpm -q --last <package name>
To find the install history of all RPMs do the following:
rpm -qa --last
NOTE: This will not sort them by install date.
- Read more about Find History of RPMs
- Log in to post comments
Test STARTTLS SMTP Connection
Run the following command to connect
openssl s_client -connect {server}:{port} -starttls smtp
Then find out what authentication is supported. It should now show "AUTH LOGIN" now that you have an encrypted connection:
ehlo {domain.com}
If you see "AUTH LOGIN" in the list then do the following:
- Read more about Test STARTTLS SMTP Connection
- Log in to post comments
Common firewall-cmd Examples
List all zones:
firewall-cmd --list-all-zones
List all active zones:
firewall-cmd --get-active-zone
To add a host or network to allow all connections from:
firewall-cmd --permanent --zone=trusted --add-source=10.10.10.10
Add a service to be allowed from anywhere:
firewall-cmd --permanent --add-service=smtp
When you run firewall-cmd with the "--permanent" it will not be active until the dameon is reloaded. Do the following to make them active:
firewall-cmd --reload
- Read more about Common firewall-cmd Examples
- Log in to post comments
Get epoch with Date Command
Here is a quick way to get the current epoch with the date command:
date +%s
- Read more about Get epoch with Date Command
- Log in to post comments
Listing all Versions of a Package/Installing a specific Version in Fedora 22
To list all installed versions of a package both currently installed and a available within your repositories:
Fix Fn Keys on ASUS Laptops
If you find your Fn keys don't work like volume up/down try the following:
su - echo asus-nb-wmi > /etc/modules-load.d/asus-nb-wmi.conf reboot
- Read more about Fix Fn Keys on ASUS Laptops
- Log in to post comments