I would like to install a lot of apps, and I has been saving all commands to install each app, here is a sample:
##Global
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886 0DF731E45CE24F27EEEB1450EFDC8610341D9410
echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo add-apt-repository ppa:qbittorrent-team/qbittorrent-stable
sudo add-apt-repository ppa:otto-kesselgulasch/gimp
sudo apt-get update; sudo apt-get -y install indicator-multiload spotify-client sublime-text qbittorrent gimp virtualenv rar unrar postgresql pgadmin3 python-pip python-dev libmysqlclient-dev p7zip-full
##Kaggle
pip install kaggle
chmod 600 /home/username/.kaggle/kaggle.json
##Jdownloader
wget http://installer.jdownloader.org/JD2SilentSetup_x64.sh
chmod +x JD2SilentSetup*.sh
./JD2SilentSetup*.sh
##Teamviewer
sudo wget https://download.teamviewer.com/download/linux/teamviewer_amd64.deb
sudo dpkg -i --force-depends teamviewer_amd64.deb
sudo apt-get install -f
sudo teamviewer --daemon start
teamviewer
How can I run all lines at once using scripting on bash command line? Thanks!
bash /path/to/filename
– Terrance Mar 15 '18 at 02:15bash ubuntu.txt
? – ambigus9 Mar 15 '18 at 02:23chmod +x filename
but, you would have to add a line to the beginning stating what shell it is going to launch in. The first line of the file would have something similar to#!/bin/bash
. However, you don't have to do that if you just putbash
in front of it then it will try to run each line individually. So, yes,bash ubuntu.txt
would work just fine. – Terrance Mar 15 '18 at 02:25sudo
. So, yes, you might have to if it takes longer than that. From my understanding though, each time it runssudo
starts the timer again, so you might only need it once. – Terrance Mar 15 '18 at 02:31