Installing SPICE (ngspice or LTspice) on ubuntu 12.04

Spice is a general purpose circuit simulation program. SPICE originates from the EECS Department of the University of California at Berkeley. For most of the commericial tools available today uses SPICE as their base. The home page for Spice is available at

It seems that there are two variants that are free can be installed ngspice and LTSpice.


  • It supports command line only

  • Can be installed on linux

  • I have installed it on Ubuntu 12.04 using the instructions provided on

      To install latest ngspice (rework-26) on Ubuntu.  
      Tested on Ubuntu 12.04
      sudo apt-get update
      sudo apt-get install build-essential linux-headers-`uname -r`
      sudo apt-get install libtool automake autoconf
      sudo apt-get install flex bison texinfo
      sudo apt-get install libx11-dev libxaw7-dev
      Go to:
      download ngspice--26.tar.gz to a working area.
      gunzip ngspice-26.tar.gz
      tar xvf ngspice-26.tar 
      Go into the newly created ngspice-26 directory and type:
      sudo make install
      when finished, ngspice will be installed in 


Ngspice on ubuntu please answer my question…

Please ensure that the command is linux-headers-`uname -r`. Notice it is tick and not quote character.