Last active
March 26, 2023 12:58
-
-
Save Azer5C74/6deca5da58f76fad743e393f2c07fdbb to your computer and use it in GitHub Desktop.
Run phpstorm as sudo so you can edit all the project files. Make sure to add the permission to execute to the file by running this command : $ chmod +x sPhpStorm.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Find the path to PhpStorm | |
phpstorm_path=$(find / -name "phpstorm.sh" 2>/dev/null | head -n 1) | |
# Check if PhpStorm was found | |
if [[ -z "$phpstorm_path" ]]; then | |
echo "PhpStorm not found" | |
exit 1 | |
fi | |
# Run PhpStorm as sudo | |
sudo "$phpstorm_path" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment