I found two ways to configure the /etc/resolv.conf file to prevent it to be overridden by the system.
- Edit the base file under the resolv.conf.d file
sudo vim /etc/resolvconf/resolv.conf.d/base
and then add the nameservers to the file:
lastly, update resolvconf:
sudo resolvconf -u
2. Install dnsmasq and edit /etc/dnsmasq.conf to add the nameservers you want.
sudo apt install dnsmasq
Then restart the network services:
sudo service dnsmasq restart and
sudo service network-manager restart
You should be all set now.
If you use a modern Ubuntu distribution (the latest 18.04 LTS or 17.XX), you might have noticed that the package to configure the network changed.
Ubuntu changed to Netplan, that is more modern and relatively simpler to use. The file configuration for a static IP should be as follows.
# cat /etc/netplan/01-netcfg.yaml
addresses: [YY.YY.YY.YY, 188.8.131.52]
Reference: I extracted the following information from https://ppc64el.wordpress.com/2018/03/22/ubuntu-18-04-netplan/
Please visit the link above for more information (including the original /etc/network/interfaces format of the eth0 interface before the transition to netplan).
The Silversearcher tool is a super fast search tool that gives you rich information when searching for a string through all your files.
To install it:
sudo apt install silversearcher-ag
The Github project page:
You can find answers about why it is so fast, a chance to collaborate and other info there.
Commands from vim buffers can take long to get into our brains. Practice will lead to perfection… eventually.
Here are some tips to get them into memory faster:
:e filename - Edit a file an existing file in a new buffer
:sp filename - Open a file in a new buffer and split window
:vs or :vsp Open a file in a new buffer and split window vertically
ctrl+ws - Split window to work in two places of the same file
ctrl+wv - Split window vertically (and work in the same file)
:bnext (or :bn) - go to next buffer
:bprev (of :bp) - go to previous buffer
:bd - delete a buffer (close a file)
ctrl+ww - switch between windows
ctrl+wq - Quit a window
With pictures to decorate this post:
Open up a new file called ‘example1’
With ‘example1’ open, type in ‘:vs example2’ to vertically split the window and edit a new file ‘example2‘. It will open up a new buffer to the left of ‘example1’
From the ‘example2’ buffer, type in ‘:sp example3’ to horizontally split the screen and edit a new file ‘example3‘. It will open a new buffer above ‘example2’
All three buffers displayed. Use CTRL-W+W to cycle through them.
1.1. RPM based distros (RHEL, CentOS, Fedora)
$ sudo rpm --import repomd.xml.key
$ rpm -q gpg-pubkey|sort
rpm -qi | grep Summary
(or without the ‘grep’ part to view full info of the key package)
sudo rpm -e --allmatches
[root chip ~]# rpm -q gpg-pubkey|sort
[root chip ~]# rpm -e --allmatches gpg-pubkey-8df56d05-3e828977
[root chip ~]# rpm -q gpg-pubkey|sort
1.2 Debian / Ubuntu
$ gpg --list-keys user_ID
$ gpg --list-keys
pub 2048R/E5****A4 2015-01-12
uid IBM Software Development Kit for Linux on Power
sub 2048R/F2*****9 2015-01-12
pub 4096R/78C*****4 2016-02-11
uid IBM SDK for Linux on Power (The IBM Software Development Kit for Linux on Power is a free Eclipse-based Integrated Development Environment) <firstname.lastname@example.org>
sub 4096R/B3*****0 2016-02-1
Add a gpg-key in your environment:
After you get the .gpg file, you need to
'add-apt-key' it into your keyring. Here:
$ sudo apt-key add .gpg
$ sudo apt-get update
UPDATE: This issue does not seem to happen in Fedora 26.
I just booted a fresh Fedora 25 (server, ppc64le) and attempted to install vim (I do not like vi) and had the following error:
Error: Transaction check error:
file /usr/share/man/man1/vim.1.gz from install of
vim-common-2:8.0.133-2.fc25.ppc64le conflicts with
file from package vim-minimal-2:7.4.1989-2.fc25.ppc64le
Cool, let’s remove vim-minimal:
$ sudo dnf remove vim-minimal
If you see what I saw, this will trigger the uninstall of a whole lot of packages, including
sudo.Saying it will remove
sudo can scare the bejesus out of many people, but this will not be a problem if you are logged as root. (
sudo -s / sudo -su).
$ sudo -su
Now you can bravely go on: remove
vim-minimal and then install vim-enhanced. You should be all good.
If you ever wanted to use ipdb (from IPython) debugger when using Python 2.7, you might have faced an issue like this:
$ sudo pip install ipython
Downloading ipython-6.0.0.tar.gz (5.1MB): 5.1MB downloaded
Running setup.py (path:/tmp/pip_build_root/ipython/setup.py) egg_info for package ipython
IPython 6.0+ does not support Python 2.6, 2.7, 3.0, 3.1, or 3.2.
When using Python 2.7, please install IPython 5.x LTS Long Term Support version.
Beginning with IPython 6.0, Python 3.3 and above is required.
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/ipython
So you gotta go ahead and install IPython==5.0, because it’s the last LTS version. Do:
#pip install IPython==5.0
And then you should get:
ImportError: No module named packaging.version
Hm, that was not expected. Installing setuptools or packaging did not work for me at this moment. To get away with this error I had to install pip3 and then upgrade pip:
251 sudo apt-get install python3-pip
252 sudo pip3 install --upgrade pip
253 sudo pip install ipython==5.0
254 sudo pip install ipdb
After that, both IPython and ipdb installed with no issues or errors and life was happy again.
If the above still does not fix the issue, or if pip and ipython are bound to python 3, you can try this, according described in the packaging.python.org website:
- Download get-pip.py
python get-pip.py. This will install or upgrade pip. Additionally, it will install setuptools and wheel if they’re not installed already.
Let me know if that worked for you too.