Debian/Ubuntu/RedHat/CentOS
By default debconf uses ‘dialog’ interactive frontend so in case there are options to choose from during package installation a relevant dialog with a list of available options will pop up. Even if apt is used with -y (--assume-yes) option it still may require some user input. To completely disable this behavior and make the dpkg backend always choose the default options (i.e. in non interactive scripts) set the debconf frontend to ‘noninteractive’ by exporting relevant environment variable:
export DEBIAN_FRONTEND=noninteractive
Reconfigure default editor
sudo update-alternatives --config editor
Persisting netfilter firewall rules across boots in Ubuntu Xenial
Install iptables-persistent package.
Rules (IPv4) to be applied are held in /etc/iptables/rules.v4 file. Dump current rules to it:
iptables-save > /etc/iptables/rules.v4
Rules management is done by a native systemd service named netfilter-persistent:
#Enable rules at boot:
systemctl enable netfilter-persistent
#Load rules manually
systemctl start netfilter-persistent
#Clean all rules
/usr/sbin/netfilter-persistent flush
Listing all available package versions
“--showduplicates“ option of yum’s “list” command shows all available versions for a given package:
[root@a3205c7126f0 /]# yum list --showduplicates python3
(...)
Available Packages
python3.i686 3.6.8-17.el7 base
python3.x86_64 3.6.8-17.el7 base
python3.i686 3.6.8-18.el7 updates
python3.x86_64 3.6.8-18.el7 updates
root@18988a2aac6d:/# apt policy tar
tar:
Installed: 1.29b-2ubuntu0.2
Candidate: 1.29b-2ubuntu0.2
Version table:
*** 1.29b-2ubuntu0.2 500
500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
100 /var/lib/dpkg/status
1.29b-2 500
500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
“***” marks the currently installed version
Installing explicit version of a package
Follow package name by “-” plus version string:
[root@a3205c7126f0 /]# yum install python3-3.6.8-17.el7
(...)
Follow package name by “=” plus version string:
root@18988a2aac6d:/# apt install tar=1.29b-2
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
ncompress xz-utils tar-scripts tar-doc
The following packages will be DOWNGRADED:
tar