Posts Tagged ‘Ubuntu’

Hello everyone,

Before I install packages, I’d like to check their status using aptitude,

$ aptitude search gimp
p   extremetuxracer-gimp-dev        - plugins for GIMP for easy development of e
i   gimp                            - The GNU Image Manipulation Program        
p   gimp-cbmplugs                   - plugins for The GIMP to import/export Comm
i A gimp-data                       - Data files for GIMP                       
i   gimp-data-extras                - An extra set of brushes, palettes, and gra
p   gimp-dbg                        - Debugging symbols for GIMP                
p   gimp-dcraw                      - GIMP plug-in for loading RAW digital photo
p   gimp-dds                        - DDS (DirectDraw Surface) plugin for GIMP  
p   gimp-dimage-color               - GIMP plugin to convert Minolta DiMAGE pict
p   gimp-flegita                    - Scanner plugin for the GNU image manipulat
p   gimp-gap                        - animation package for the GIMP            
p   gimp-gluas                      - Lua environment plug-in for GIMP          
i A gimp-gmic                       - GREYC's Magic for Image Computing - GIMP P
p   gimp-gutenprint                 - print plugin for the GIMP                 
v   gimp-help                       -                                           
p   gimp-help-common                - Data files for the GIMP documentation     
p   gimp-help-de                    - Documentation for the GIMP (German)       
p   gimp-help-en                    - Documentation for the GIMP (English)      
p   gimp-help-es                    - Documentation for the GIMP (Spanish)      
p   gimp-help-fr                    - Documentation for the GIMP (French)       
p   gimp-help-it                    - Documentation for the GIMP (Italian)      
p   gimp-help-ko                    - Documentation for the GIMP (Korean)       
p   gimp-help-nl                    - Documentation for the GIMP (Dutch)        
p   gimp-help-nn                    - Documentation for the GIMP (Norwegian)    
p   gimp-help-pl                    - Documentation for the GIMP (Polish)       
p   gimp-help-ru                    - Documentation for the GIMP (Russian)      
p   gimp-help-sv                    - Documentation for the GIMP (Swedish)      
v   gimp-helpbrowser                -                                           
p   gimp-lensfun                    - Gimp plugin to correct lens distortion usi
i   gimp-plugin-registry            - repository of optional extensions for GIMP
v   gimp-python                     -                                           
p   gimp-resynthesizer              - Transitional package for gimp-plugin-regis
v   gimp-save-for-web               -                                           
p   gimp-texturize                  - generates large textures from a small samp
p   gimp-ufraw                      - gimp importer for raw camera images       
p   gtkam-gimp                      - gtkam gimp plugin to open digital camera p
i A libgimp2.0                      - Libraries for the GNU Image Manipulation P
p   libgimp2.0-dev                  - Headers and other files for compiling plug
p   libgimp2.0-doc                  - Developers' Documentation for the GIMP lib
p   libgimpactutils2.81             - professional 3D Game Multiphysics Library 
p   planetpenguin-racer-gimp-dev    - Dummy transition package for extremetuxrac

I won’t lie to you… from the very beginning I knew that the i at the first column meant installed… but What about the other keys?

I found the answer by looking at the documentation, using

$ man aptitude

Here’s is the thing:

Each search result is listed on a separate line. The first character of each line indicates the current state of the package: the most common states are p, meaning that no trace of the package exists on the system, c, meaning that the package was deleted but its configuration files remain on the system, i, meaning that the package is installed, and v, meaning that the package is virtual. The second character indicates the stored action (if any; otherwise a blank space is displayed) to be performed on the package, with the most common actions being i, meaning that the package will be installed, d, meaning that the package will be deleted, and p, meaning that the package and its configuration files will be removed. If the third character is A, the package was automatically installed.

Great!!! Isn’t it?


Read Full Post »

In order to install CalcHEP, one needs to download the code and to compile it.

The code can be found at http://theory.sinp.msu.ru/~pukhov/calchep.html, as usual it is recommended to download the current version, unless a major pre-requisite problem is in sight.


It is useful to install some packages before start compiling CalcHEP

 $ sudo apt-get install cernlib gfortran xlibx11-dev

Then, go to the folder where CalcHEP was downloaded and decompress it,

 $ tar -xzf calchep_3.4.cpc.tgz

Now, move to the calchep_3.4.cpc folder and compile the code

 $ cd calchep.3.4.cpc
 $ make

If the code has compiled without errors, it is enough to start working. However, usually it is recommended to do a couple of extra things.

Creating a Working folder

The default work directory is


, but in general it is a good idea to have an independent “work folder”, in order for doing so, in the CalcHEP directory there is a script to create that folder… it is called mkUsrDir and admits one argument (the path to the folder you want to create)

 $ ./mkUsrDir ~/Documents/WorkCalcHEP

Once created the working directory, you can move there and call the CalcHEP console (assuming the directory created above I would do the following)

 $ cd ~/Documents/WorkCalcHEP
 $ ./calchep

and you get this:calchep-console

Now, you are ready to start working!

Read Full Post »

If you have programmed in Python, perhaps you would know IPython.

IPython is an interactive shell for python programming.

Installing IPython

In the terminal (Ctrl+Alt+T), run the command line

$ sudo apt-get install -y ipython ipython-notebook

and after entering your sudo password, IPython will be installed.

Command to install IPython

Command to install IPython

Running IPython

In the terminal, launch the command

$ ipython
Command to Call the Ipython session

Command to Call the Ipython session

and you will have you session running.

Initial Ipython session

Initial Ipython session

More about IPython in a next post!!! (specially about the notebook) 😉

Cheers, and enjoy life!

Read Full Post »

If for any reason you need to un-install Mathematica,  you should delete the files associated to it. If the installation was the usual one, follow the below steps.

$ cd /usr/local
$ sudo rm -r Wolfram
$ cd bin
$ sudo rm math mathematica Mathematica MathKernel mcc
$ cd ../../share
$ sudo rm -r Mathematica

This would be enough.


Read Full Post »

The lsusb command lists the USB devices of the computer.


$ lsusb 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 003: ID 2232:1029  
Bus 002 Device 003: ID 8087:07da Intel Corp. 
Bus 003 Device 002: ID 0458:003a KYE Systems Corp. (Mouse Systems) NetScroll+ Mini Traveler / Genius NetScroll 120

As most commands in Linux, it has some flags, which I’ll explain below. But first, let’s explain a little bit those numbers.

  • Bus: In computer architecture, a bus is a subsystem that transfers data between components inside a computer, or between computers
  • Device: is the specific device number
  • Vendor: The vendor ID is the first (octal) number after the ID label
  • Product: The product ID is the second (octal) number after the ID label, placed after the colon :
  • Description: If available, the final part is a brief description of the product

Options (or flags)

 $ lsusb -v

It is the verbose mode. The detailed information of the devices is shown.

 $ lsusb -t

The devices information is shown as a tree.

 $ lsusb -s 001:

Show the device(s) whose Bus number is 001. In the above output, there are 3 of these.

 $ lsusb -s 001

Show the device(s) whose device number is 001. In the above output, there are 4 of these.

 $ lsusb -s 001:002

Show the device whose Bus and Device number are 001 and 002 respectively.

In the three previous examples the flag s can be changes by d, if one’d like to specify the Vendor and Product ID respectively.



Read Full Post »

WARNING: The following is a PERSONAL brief of part of the second chapter of the book How Linux Works: what every superuser should know by Brian Ward

Linix device files are in the /dev directory. A device can be identified using the ls -l command.

An extract of the output from the command line ls -l /dev is shown below,

crw-rw----+ 1 root cdrom    21,   1 Sep  6 01:23 sg1
lrwxrwxrwx  1 root root           8 Sep  6 01:23 shm -> /run/shm
crw-------  1 root root     10, 231 Sep  6 01:23 snapshot
drwxr-xr-x  3 root root         220 Sep  6 01:23 snd
brw-rw----+ 1 root cdrom    11,   0 Sep  6 01:23 sr0
srw-rw-rw-  1 root root           0 Sep  6 01:23 log
prw-r--r--  1 root root           0 Sep  6 01:23 gpmdata

The first column is a code which indicates the type of ‘file’ (the first character) and permissions (the other nine characters).

If the first character is b, c, p, or s, then the file is a device. These letters stand for block, character, pipe, and socket, respectively:

  • block: Programs access data in a block device in.
  • character: Character devices work with data streams.
  • pipe: are like character devices, but there is another process at the other end of the I/O stream instead of a kernel driver.
  • socket: are special-purpose I/O files offering a type of network interface.

The numbers before the dates in the first two lines of the previous listing are the major and minor device numbers that help the kernel identify the device.


Read Full Post »

The wc command is a word counter, but counts bytes, letter or lines as well.


 $ wc [OPTION] ... [FILE] ...


 $ wc -l file

Counts the number of lines in file.

 $ wc -w file

Counts the number of words in file.

 $ wc -m file

Counts the number of characters in file.

 $ wc -c file

Counts the number of bytes in file.

 $ wc -L file

Prints the lenght of the longest line in file.


Read Full Post »

Older Posts »