Hot answers tagged

3

sed and arithmetic do not mix. The right tool for jobs like this is awk. Consider this test file: $ cat test.txt /nonmatching/line 1 /home/username/Pictures/properties/wallpaper/span/tree.jpg 2 /another/non/matching/line 5 We can increment the number of the line that you want with: $ line="/home/username/Pictures/properties/wallpaper/span/tree.jpg" $ ...


2

You are trying to run /etc/environment as a command. If you want to edit it, you can use nano or vim (if you are beginner I would recomend nano). Type STUDIO_JDK=/usr/lib/jvm/java-8-openjdk-amd64 inside and press Ctrl+O to save, then Ctrl+X to exit nano.


1

You should set the environment variables in your ~/.profile. This file is sourced by display managers such as LightDM which start the X server and the rest of the graphical system. It’s also sourced by Bash (as long as ~/.bash_profile doesn’t exist) – and other POSIX shells – for non-graphical, i.e., network and console logins. The Ubuntu Wiki has lots of ...



Only top voted, non community-wiki answers of a minimum length are eligible