Skip to content

Instantly share code, notes, and snippets.

@plembo
Last active January 5, 2023 12:18
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save plembo/f7b1b9e71d1f2a63f04148be1b5ae60c to your computer and use it in GitHub Desktop.
Save plembo/f7b1b9e71d1f2a63f04148be1b5ae60c to your computer and use it in GitHub Desktop.
SQL Workbench/J on Linux

Setting up SQL Workbench/J on Linux

SQL Workbench/J is a cross-platform graphical database query tool written in Java. All you need to run it is to download and extract the zip distribution and have the JRE and JDBC drivers for your DBMS installed.

These instructions were tested on Ubuntu 18.04 LTS with the Gnome Shell desktop environment. YMMV.

  1. Verify that the JRE is installed:
java -version
  1. Check that you have the JDBC driver for your DBMS. On Ubuntu Linux 18.04 LTS those that ship with the system can be found under /usr/share/java, like "postgresql.jar".

  2. Download the latest stable zip distribution of SQL Workbench/J.

  3. Extract to the location of your choice, like "$HOME/app/sqlworkbench":

mkdir $HOME/app/sqlworkbench
unzip -d $HOME/app/sqlworkbench Workbench-Build123.zip
  1. Set sqlworkbench and sqlwbconsole.sh to executable:
chmod $HOME/app/sqlworkbench/ugo+x sqlworkbench.sh
chmod ugo+x $HOME/app/sqlwbconsole.sh
  1. Create a sqlwb.desktop file for the application under $HOME/.local/share/applications:
[Desktop Entry]
Name=SQL Workbench/J
GenericName=Database Browser
Comment=Browse databases
Exec=/home/myuser/app/sqlworkbench/sqlworkbench.sh
Terminal=false
Type=Application
Icon=/home/myuser/app/sqlworkbench/workbench32.png
Categories=Development;Utility;
StartupNotify=true
  1. Create symlinks for command line use:
ln -s ~/app/sqlworkbench/sqlworkbench.sh ~/bin/sqlworkbench
ln -s ~/app/sqlworkbench/sqlwbconsole.sh ~/bin/sqlwbconsole
  1. Test by running "sqlworkbench".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment