Tuesday, January 2, 2018

Linux misc (iptables, dig, rpm)

echo $LANG
en_US.UTF-8

CTRL-SHIFT-U allows you to enter the 4 letters for a Unicode character (eg 03bb is greek lambda)

localectl

System Locale: LANG=en_US.UTF-8
VC Keymap: it
X11 Layout: it,us
X11 Variant: ,

to change locale:
localectl set-locale LANG=fr_FR.utf8

cat /etc/locale.conf
LANG="en_US.UTF-8"

list all available language packs:
yum langavailable

list installed language packs:
yum langlist


iptables tutorial instructions: https://www.howtogeek.com/177621/the-beginners-guide-to-iptables-the-linux-firewall/

sudo iptables -L -v
sudo iptables -F
sudo cat /etc/sysconfig/iptables


network:
dig
systemctl status firewalld
systemctl status NetworkManager



history: remove line numbers by adding to .bash_profile
HISTTIMEFORMAT="$(echo -e '\r\e[K')"

#rpm list all packages
rpm -qa | grep ansible
#this installs 1.1 without removing 1.0 if exists
rpm -ivh some-package-1.1
#this updates (if existing) 1.0 to 1.1
rpm -Uvh some-package-1.1



No comments: