Powerline is a “statusline plugin for vim, and provides statuslines and prompts for several other applications, including zsh, bash, fish, tmux, IPython, Awesome, i3 and Qtile”. It looks this cool (this is the most simply form):
In combination with ZSH, it becomes an extremely powerful -and beautiful- tool.
To quickly install just Powerline for the bash:
sudo apt install powerline powerline-fonts
Add the following at the end of ~/.bashrc:
if [ -f /usr/share/powerline/bindings/bash/powerline.sh ]; then
Sorting the fonts:
mkdir -p ~/.fonts
wget https://github.com/powerline/fonts/raw/master/LiberationMono/Literation%20Mono%20Powerline.ttf -O ~/.fonts/Liberation\ Mono\ Powerline.ttf
wget https://github.com/powerline/fonts/raw/master/LiberationMono/Literation%20Mono%20Powerline%20Bold.ttf -O ~/.fonts/Liberation\ Mono\ Powerline\ Bold.ttf
wget https://github.com/powerline/fonts/raw/master/LiberationMono/Literation%20Mono%20Powerline%20Italic.ttf -O ~/.fonts/Liberation\ Mono\ Powerline\ Italic.ttf
wget https://github.com/powerline/fonts/raw/master/LiberationMono/Literation%20Mono%20Powerline%20Bold%20Italic.ttf -O ~/.fonts/Liberation\ Mono\ Powerline\ Bold\ Italic.ttf
fc-cache -vf ~/.fonts
Now, reload the terminal:
Many times you write something in the terminal and you forget to write the sudo at the beginning. Then you have to recall the line and add it to the beginning.
Well, with this alias, you just need to write dammit and then you will execute the last command with superuser powers. That’s pretty cool, isn’t it?
[UPDATE] It seems like WP changes the command, therefore, I will publish it in a screenshot. Anyone with a visual impairment, write your contact details in the comments and I will send it for you by email.
Another missing feature in nano is showing the line (an also the column) while we are editing a file. There’s two possible solutions:
1.- Opening nano with the -c option
2.- … or modifying .nanorc:
And then add this line to the beginning:
We are used to some great pieces of software like Gedit, Notepad++, Brackets or Atom for writing our code. Among their multiple advantages, the syntax highlighting is one of their most useful, as it help us to quickly identify the blocks of our code.
However, sometimes we need to use the terminal, for example, for editing a file that is being through ssh.
Thanks to scopatz we can easily modify our nano to show our code in colours and highlight the syntax:
Take a look to his nanorc‘s github for more details.
If you are using a version of nano under 2.1.5, your .nanorc should look like this to avoid compatibility problems:
Although the use of Fedora is not as extended as Debian/Ubuntu/Linux Mint, it’s a robust distro and it’s really wide-distributed and easy to use. Unlike Ubuntu and Linux Mint, Fedora is not based on Debian, but on Red Hat, and it includes Gnome 3 as the default desktop.
If you are thinking about giving a chance to this great distro, for sure these utils are going to save a lot of time and effort:
Fedy: Installs codecs, software, repositories…
Gnome Tweak Tool: Customize advanced Gnome 3 options.
dConf Editor: Editor for low-level settings.
Gnome Extensions: add plugins and extra functions to your Gnome 3 desktop.
PostInstallerFedora: simplify and automatize the installation of a long list of available software.
Do you use different layouts in your keyboard? Here is how to change the layout of the keyboard with a simply combination of keys, instead of clicking in the icon:
- Go to Keyboard preferences.
- Add a new layout.
- Press Options…
- Search Keys to change layout and mark your preferred combination (or combinations).
- Press Close.
Let’s face it. Linux is (almost) free. Linux is Open Source. But if a company have a product and don’t want to share their technology, we can:
a) Wait until somebody figures up how to replicate their technology or…
b) Install closed and proprietary software.
Sometimes we have no alternative and we must choose the b) option. This happens sometimes with the PDFs. The built-in PDF reader in almost all distros come with a more-than-decent compatibility and is really complete. However, some things like formulas are not going to be shown properly. The solution is as easy as installing the official Adobe Acrobat Reader.
Nevertheless, due to a little bug, under some distros like Linux Mint, if you try to open a file with Acrobat Reader using the [Right Click] > Open With you will discover that… Open with Acrobat Reader is missing!!!
To solve it we need to edit the desktop file using the terminal:
Then, we find the line beginning with Exec= and we edit it to be like this:
We save the file and… Tada! Now we can find Adobe Acrobat under the [Right Click] > Open With menu. You can even set Adobe Acrobat as the default program for the PDFs.
If you have a new Android device with internal storage (like Nexus 4) and you try to copy data from/to your computer, you probably will realize that you are not able to access. This is because you have not a proper MTP support in your Linux machine.
Solving it is as easy as run this from terminal:
If you want to revert the changes:
Install basic apps for a clean installation of Linux with a simple terminal command:
(For Debian / Ubuntu / Linux Mint and derivatives)
This is what you will install:
- Ubuntu restricted extras
- Ubuntu restricted addons
- Essential tools for compiling (needed for installing some apps)
- Chromium + language pack
- Mediainfo (useful to query info from multimedia files)
- Opensource JDK 7 (Java)