Skip to content

Instantly share code, notes, and snippets.

@igniteflow
Last active January 3, 2016 08:19
Show Gist options
  • Save igniteflow/8434859 to your computer and use it in GitHub Desktop.
Save igniteflow/8434859 to your computer and use it in GitHub Desktop.
Install Oracle Java 7 on Ubuntu in a script i.e. no confirmation
#!/bin/bash
# Install Oracle Java 7 on Ubuntu in a script i.e. no confirmation
sudo add-apt-repository ppa:webupd8team/java -y
sudo echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
sudo echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections
sudo apt-get install oracle-java7-installer
sudo update-java-alternatives -s java-7-oracle
java -version
@cirosantilli
Copy link

sudo echo | does not work, you must do echo | sudo

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