Thursday, December 8, 2016

How to run the LTspice circuit simulator on Linux

I often use LTspice for simulating my circuits or even organizing workshops. Unfortunately, LTspice is distributed as a Windows application. In this post, I'll explain you how to run LTspice on your Linux distribution using WineHQ.
 $ sudo dpkg --add-architecture i386   
 $ sudo add-apt-repository ppa:wine/wine-builds  
 $ ls /etc/apt/sources.list.d/  
 $ sudo apt-get update  
 $ sudo apt-get install --install-recommends winehq-devel  
 $ mkdir WINE  
 $ echo "export WINEPREFIX=$HOME/WINE" >> $HOME/.bashrc  
 $ source $HOME/.bashrc  
First, you need to install Winehq using the instructions for your Linux distribution. The instructions above are for Ubuntu LTS 14.04 Trusty (64 bit). The folder WINE represents the Windows filesystem hierarchy (e.g. WINE/drive_c/ represents the C:/ folder in Windows).
 $ wine64 LTspiceXVII.exe  
Then, download LTspice from Linear Technology's homepage and execute the binary with wine64. Here I'm using the latest version XVII, but you can also install the version IV without problems.
 Menu > Wine > LTspiceXVII  
After the installation is complete you can use LTspice as in Windows. You can launch LTspice from the menu or from the generated Desktop icon. During the installation and execution of LTspice, WineHQ may need to download extra dependencies. Just click on yes and everything should go smoothly. If you are new to LTspice check out these slides and videos.

No comments: