DEV Community

AryanKoundal
AryanKoundal

Posted on

How to Install Obsidian On Linux | Set it's $PATH variable

In this blog we will learn about

  1. How to download Obsidian App Image.
  2. How to install and set up the $PATH for obsidian.

Let's get started.

Downloading

  • First of all, install the AppImage from the link. This file will probably be downloaded in your Home/Downloads folder.

Installing

  • Now open a terminal in your Home/Downloads folder.
  • You have to make this AppImage an executable file by using
sudo chmod +x Obsidian-1.1.9.AppImage
Enter fullscreen mode Exit fullscreen mode
  • After that you have to rename the Obsidian-1.1.9.AppImage to obsidian using
mv Obsidian-1.1.9.AppImage obsidian
Enter fullscreen mode Exit fullscreen mode
  • Then you'll have to create a new folder for obsidian at usr/bin and then copy the obsidian file to that folder.
sudo mkdir /usr/bin/obsidian
sudo cp obsidian /usr/bin/obsidian/obsidian
Enter fullscreen mode Exit fullscreen mode
  • Now to add the PATH. You have to set the variable name in ~/.profile. This can be done by using
gedit ~/.profile (any text precessor)
export PATH=$PATH:/usr/bin/obsidian
Enter fullscreen mode Exit fullscreen mode

in the terminal to open the file. Then adding line export PATH=$PATH:/usr/bin/obsidian at the end of your ~/.profile file.

  • Save and then close the file. You also have to restart the device to use these changes.
  • Now you can run obsidian from Application Launcher by Alt + F2 then typing obsidian. And from terminal by Ctrl + Alt + T then typing obsidian.

Top comments (4)

Collapse
 
ahmedelsa3eed profile image
Ahmedelsa3eed •

To be able to run obsidian from anywhere in the terminal consider the following (after renaming the downloaded file to obsidian):

sudo mv obsidian /usr/local/bin/
sudo chmod +x /usr/local/bin/obsidian
obsidian 
Enter fullscreen mode Exit fullscreen mode
Collapse
 
jonathanzollinger profile image
Jonathan Zollinger •

it's worth noting that if you want obsidian to show up in application launcher like Rofi you'll need to create a .desktop file in your user's ~/.local/share/applications directory. As an example, this is what I have for my Apache Directory Studio:

[Desktop Entry]
Version=1.0
Type=Application
Name=Apache Directory Studio
Exec=/home/trivir/ApacheDirectoryStudio/ApacheDirectoryStudio
Icon=/home/trivir/ApacheDirectoryStudio/icon.xpm
Enter fullscreen mode Exit fullscreen mode

I'm still installing obsidian otherwise I'd post that example lol

Collapse
 
kaushit profile image
Kaushit • • Edited

here is the one I have created using

kaushit@ubuntu:~/Downloads$ nano ~/.local/share/applications/obsidian.desktop

Now please paste the below content and have fun.

[Desktop Entry]
Name=Obsidian
Comment=A powerful knowledge base that works on top of a local folder of plain text Markdown files
Exec=/usr/bin/obsidian/obsidian
Icon=/usr/bin/obsidian/obsidian-logo-gradient.svg
Terminal=false
Type=Application
Version=1.5.11
Categories=Office;Utility;
MimeType=x-scheme-handler/obsidian;text/html;
Enter fullscreen mode Exit fullscreen mode

download the logo from official host
obsidian.md/images/obsidian-logo-g...

Collapse
 
early_rizor_0ca76500a5d2a profile image
Early Rizor •

Thanks!