Category Archives: Ubuntu command line

Linux Join Command Tutorial for Beginners (5 examples) by https://is.gd/cdkdNJ

Sometimes, you may want to combine two files in a way that the output makes even more sense.

If you are on Linux, and are looking for a tool that can help you in situations line these, you may want to check out join, which is a command line utility. In this tutorial, we will discuss this command using some easy to understand examples.

from https://is.gd/cdkdNJ

Selected by Galigio via Computer Borders

Hibernate for Ubuntu

Since the Ubuntu 12.04 LTS the hibernate icon disappeared as possible option at the shutdown. It is not a big loss if you are not used to use (or overuse) it as I often do. Personally I think that the hibernate feature is really useful when you want to freeze your computer maintaining all the windows -and the work- you are working on at a precise moment. 

Ubuntu decided to “cut” this particular command from its GUI because it registered a remarkable number of problems caused by hardware conflicts in modern computers. 

If you use Ubuntu and you think that hibernate could till be useful for you (especially during busy working days), it is possible to insert again this specific feature as GUI on your Desktop.

First of all you have to test if your computer contains the right hardware for “hibernate” so open Terminal and type:

sudo pm-hibernate

The computer will hibernate itself but you have to reboot it to understand if hibernate worked properly in your case.

I hope (as it was for my PC) that all has gone well. In this case you can start to create the dedicated icon on your upper bar.

Before of starting it’s necessary to understand that the hibernate command will use the SWAP partition to save your temporarily data. Usually it is recommended to have a SWAP partition with, at least, the double of space of your RAM.

So I suggest to install Gparted to check the SWAP space and, only if necessary, increase your SWAP partition reducing the primary partition. Please, do this only after you safely backup all the data in your computer because this procedure could be risky if you are doing it for the first time and you have not enough experience:

sudo apt-get install gparted

Open a Terminal and install gedit and gksu (if you don’t have them already installed on your machine) typing:

sudo apt-get install gksu && sudo apt-get install gedit
Then type:
sudo gksu gedit /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
Now a blank gedit document, named enable-hibernate.pkla will appear on your screen.

Copy and paste the following text to “compile” it:

[Enable Hibernate]

Identity=unix-user:*

Action=org.freedesktop.upower.hibernate

ResultActive=yes

Save it and reboot your computer.

A new icon will appear on the right corner of the upper bar. When you click on it, a Terminal window will appear asking for the system password. Type it and click on Return and your PC will immediately hibernate. 

Good busy working days!

How to manage the GRUB and purge old Kernel versions on the start-up menu

After a kernel update, you find the start-up menu populated with extra lines related to all the old kernel versions plus the current one. To manage the start-up manager and safely remove old kernels you have to manually operate on it.
First of all you have to double-check what is the current kernel version.
Open a Terminal and type:
uname -r
The result will be something similar to: 2.6.32-35-generic
Then you will go to the boot directory through the command:
cd /boot ls vmlinuz*
The next step will be to obtain more information about old kernel you have on our PC:
ls vmlinuz*
Now in the Terminal you have results similar to these:
vmlinuz-2.6.32-21-generic  vmlinuz-2.6.32-25-generic  vmlinuz-2.6.32-35-generic
vmlinuz-2.6.32-24-generic  vmlinuz-2.6.32-26-generic
As last step you have to remove all the old version of the kernel using this command:
sudo apt-get remove linux-image-X.X.XX-XX-generic
where “x” is the obsolete kernel version you want to purge. In my specific case the proper command line I used was:
sudo apt-get remove linux-image-2.6.32-21-generic linux-image-2.6.32-24-generic linux-image-2.6.32-25-generic linux-image-2.6.32-26-generic
Last but not least go to System –> Administration –> StartUp Manager (available for installation on Synaptics or on Ubuntu Software Center) and select your OS choice in the Default Operating System menu. That’s all! AddThis

Install Conky system monitor for Linux and configure it in few basic steps

Conky is one of the most powerful and versatile system monitors for Linux desktops. It allows you to monitor and display all the information about your hardware, top processes, network, emails and more. At the moment more than 300 different feature has been built for Conky and searching on the web you always find the perfect feature already developed by someone.

– Installation on Ubuntu:

in Terminal run: sudo apt-get install conky

– Configuration:

In Terminal run: sudo nautilus

Go to File System: /etc/conky/conky.conf

Save a copy of the original conky.conf in another location and open the original file with Gedit Text Editor

First of all change: own_window yes to own_window no

Choose your preferred alignment (some samples below…):
alignment top_right
or
alignment middle_right
or
alignment bottom_right

Play with: update_interval 1.0
and change the interval value till you find the right ratio to obtain the best speed for you (in my case it was 0.80).

Add this line to eliminate any flickering:
double_buffer yes
but, on some computers, all the icon on your desktop will be hidden and you need to use (move) the mouse to discover them if you will not add this parameter: own_window_type normal

Add, as last line (or in other position if you prefer):
${color red} ${cpugraph} to have a clear graph about cpu (obviously you can choose the color you prefer)

For automatic start of Conky at startup, please follow the following instructions:
Run Startup Applications in System –> Preferences
Click on Add and save after updating the following instructions
Name: Conky
Command: /usr/bin/conky

Restart Ubuntu to check your new Conky “applet”

Link to Conky: http://conky.sourceforge.net/

For more info about Conky’s variables: http://conky.sourceforge.net/variables.html

Find online some pre-compiled Conky configuration files, searching, for example, on: http://gnome-look.org
AddThis

Maximize internet speed connection in Ubuntu via sysctl

Do you want to maximize your bandwidth? Here are few important settings you should do to speed up your internet and it works in Ubuntu and all Linux operating system via sysctl.
First open a Terminal via Applications->Accessories->Terminal
Type:

sudo gedit /etc/sysctl.conf

Then Paste the Following at the end of the file:

# increase TCP max buffer size setable using setsockopt()
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
# increase Linux autotuning TCP buffer limits
# min, default, and max number of bytes to use
# set max to at least 4MB, or higher if you use very high BDP paths
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
# don’t cache ssthresh from previous connection
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_moderate_rcvbuf = 1
# recommended to increase this for 1000 BT or higher
net.core.netdev_max_backlog = 2500
# for 10 GigE, use this, uncomment below
# net.core.netdev_max_backlog = 30000
# Turn off timestamps if you’re on a gigabit or very busy network
# Having it off is one less thing the IP stack needs to work on
#net.ipv4.tcp_timestamps = 0
# disable tcp selective acknowledgements.
net.ipv4.tcp_sack = 0
#enable window scaling
net.ipv4.tcp_window_scaling = 1

Press Ctrl-S to save, then alt-F4 to exit and then type:

sudo sysctl -p

to apply the settings.

Now, check your speed using speed-test site or download files in the net.

You can disable all these settings by removing these lines you added via:

sudo gedit /etc/sysctl.conf

AddThis mp3 link

PPASearch: la mejor herramienta para buscar repositorios PPA en Ubuntu

Hay veces que queremos instalar alguna aplicación y no sabemos muy bien cuales son los repositorios correctos PPA de Launchpad. gracias a PPASearch esto se hace todo muy muy fácil. Lo primero que hay que hacer es instalar esta aplicación en nuestra Distro con los siguientes comandos:

sudo add-apt-repository ppa:wrinkliez/ppasearch
sudo apt-get update && sudo apt-get install ppasearch

Cuando ya tengamos instalada esta aplicación, podemos buscar el repositorio que mas nos interese, para hacer eso lo único será ejecutar PPASearch y el nombre del programa de lo cual buscamos el repositorio: ejemplo

ppasearch skype

Buscando por los repositorios de Skype me salieron diferentes repositorios y cada uno identificado con un numero, para instalar alguno de ellos, lo único será elegir el numero correspondiente y PPASearch se ocupará de instalar el repositorio seleccionado. ¡Muy buena herramienta!

Agradezco mucho el Blog Ubuntulife por su labor y por todas las informaciones y ayuda incluida esa entrada  http://ubuntulife.wordpress.com/ AddThis mp3 link

How to manage podcast and RSS reader on Firefox!

This week, in our Linux Page (in Spanish), we posted some lines about editing and changing the feed/podcast reader on Firefox when you have previously chosen a specific program to automatically subscribe to podcasts. If you are using Firefox 3.5 on Linux, you can simply go to Edit -> Preferences and type Feed in the search bar. At this point you have a button menu with all the different options; we suggest to select the  Preview in Firefox one. If you have an older version of Firefox that does not allow you to follow the above path (or for some reason, by default, you prefer the most difficult way) you have to open a new Tab and type about:config in it. After a brief warning message you can type Feed in the location bar and find the browser.feeds.handler line. At this point it is necessary to change the value field to Ask and next time you will decide to subscribe a podcast you will free to choose your favourite program. We hope this few lines could be useful and easy to execute for you all! AddThis mp3 link

How to repair a bad upgrade on Ubuntu!

This week, in our Linux Page (in Spanish) we posted some tips about repairing a bad Linux upgrade.  In fact, it is rare but sometimes, unfortunately, it happens. I mean one or more error during an upgrade installation on Ubuntu. In my case the problem was caused by a blackout and a battery which did not worked properly. When I restarted the PC it worked only in text mode and it asked me the login and the password to enter into the Ubuntu root mode. Obviously, as usual, I typed the requested data and then, after reading how to solve similar problems on internet, I decided to go forward with sudo apt-get update. At this point Ubuntu advised me that something had been wrong during the last update and suggested to try with sudo dpkg –configure -a.  I followed the suggestions and I concluded the “repair session” with  sudo apt-get upgrade –fix-broken. Fifteen minutes later and after rebooting all the “bad upgrade” problems were solved. Recommended! Bookmark this page! mp3 link

How to install Ubuntu Tweak and Moblock on Ubuntu 9.04 Jaunty

Today , in our Linux Page (in Spanish) we posted a brief review about installing Ubuntu Tweak and Moblock on Ubuntu 9.04. We have read different websites on these topics but the best are the official ones that we advise you to visit them:
http://ubuntu-tweak.com/downloads for Ubuntu Tweak and
http://moblock-deb.sourceforge.net/ for Moblock.
Ubuntu Tweak is the most flexible graphical interface to configure desktop and system options on your Jaunty. On the other side,Moblock is a powerful software to protect your privacy when you surf internet and it is based on a huge list of IP address which are not considered as friendly.
We strongly believe that the most efficient solution is to add the sources on your Software Sources (System – Administration – Software Sources); for Ubuntu Tweak:
1 – using Terminal, import the key sudo apt-key adv –recv-keys –keyserver keyserver.ubuntu.com FE85409EEAB40ECCB65740816AF0E1940624A220
2 – import the source on the Software Sources

deb http://ppa.launchpad.net/tualatrix/ubuntu jaunty main
deb-src http://ppa.launchpad.net/tualatrix/ubuntu jaunty main

3 – install Ubuntu Tweak (using Terminal)
sudo apt-get update
sudo apt-get install ubuntu-tweak
To add Moblock in your sources it is necessary:
1 – import the keys, using Terminal
gpg –keyserver keyserver.ubuntu.com –recv-keys 9C0042C8
gpg –export –armor 9C0042C8 | sudo apt-key add –
2 – import the source on the Software Sources
deb http://ppa.launchpad.net/jre-phoenix/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/jre-phoenix/ppa/ubuntu jaunty main
3 – install Moblock (using Terminal)
sudo aptitude update
sudo aptitude install moblock blockcontrol mobloquer

Recommended! AddThis mp3 link