Skip to content

Instantly share code, notes, and snippets.

Last active June 16, 2022 11:15
  • Star 36 You must be signed in to star a gist
  • Fork 15 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Update phpstorm on Ubuntu linux.
#!/bin/bash -e
# IMPORTANT. My phpstom installation exists on /opt/phpstorm.
# Early Access program:
# For stable releases try:
if [ "$(whoami)" != "root" ]
echo "Sorry, you are not root."
exit 1
echo -n "Please enter the PhpStorm download url (eg "
read url
# Download file from url
echo "Downloading PhpStorm to ~/Desktop"
cd ~/Desktop
wget ${url} --no-check-certificate
tar -xzf ~/Desktop/PhpStorm*
rm ~/Desktop/PhpStorm*.tar.gz
# Remove old Phpstorm
echo "Removing old PhpStorm"
rm -rf /opt/phpstorm
# Copy new Phpstorm
echo "Copying new PhpStorm"
mv ~/Desktop/PhpStorm* /opt/phpstorm
# Finish
echo "New PhpStorm has been installed!"
Copy link

rm ~/Desktop/PhpStorm*.tar.gz
would be better than
rm ~/Desktop/PhpStorm*

Copy link

Pherserk commented Dec 4, 2016

love it

Copy link

Maybe this is be better idea

if [ "$(whoami)" != "root" ]
echo "Sorry, you are not root."
exit 1

than # IMPORTANT. Run with sudo!

And also, for linux save in /tmp will be correctly than save temporary file on desktop.

Copy link

what about any additional installed plugins?

Copy link

olivertappin commented Jul 20, 2017

A simple, similar script to update to the latest version of PhpStorm on Ubuntu (without having to type in a URL):

Copy link

zabidok commented Sep 13, 2017

New similar script for install or update(auto) jetbrains products like phpstorm, webstorm and other. + java + non latin hotkeys fixes

Copy link

ghost commented Sep 16, 2017

Super Useful :)


Copy link

Why not use rsync ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment