sh bash-on-windows-init.sh

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh bash-on-windows-init.sh相关的知识,希望对你有一定的参考价值。

#!/bin/bash

# run sudo apt update or similar and feed the password for the rest to run smooth
# this is for the old bash based on ubuntu 14.04

sudo apt update && sudo apt dist-upgrade -y

# Instlall NodeJS, Yarn and npm related dependencies
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt install -y nodejs yarn

sudo npm install -g @angular/cli

# Install dotnet core
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
sudo apt update && sudo apt install -y dotnet-sdk-2.0.2

# Install java related stuff
sudo apt install maven openjdk-9-jdk-headless

# Configure docker to work with docker on windows
mkdir -p /home/peter/.local/bin
sudo ln -s /mnt/c/Program\ Files/Docker/Docker/resources/bin/docker.exe ~/.local/bin/docker
sudo ln -s /mnt/c/Program\ Files/Docker/Docker/resources/bin/docker-compose.exe ~/.local/bin/docker-compose

# Install ansible and other smaller tools
sudo add-apt-repository ppa:git-core/ppa
sudo apt-add-repository ppa:ansible/ansible
sudo apt update && sudo apt install -y ansible git python ipython python3 ipython3 python-pip build-essential vim zsh autojump unzip zip dos2unix jq
# Configure git
git config --global core.autocrlf input

pip install --upgrade --user awscli

# Get Oh My ZSH
zsh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# make zsh default shell
echo "# Launch Zsh
if [ -t 1 ]; then
exec zsh
fi" >> ~/.bashrc

以上是关于sh bash-on-windows-init.sh的主要内容,如果未能解决你的问题,请参考以下文章

sh sh_template.sh

sh sh.sh

Linux下面如何运行 SH文件

配置告警系统主脚本main.sh mon.sh load.sh 502.sh disk.sh

shell 脚本各种执行方式(source ./*.sh, . ./*.sh, ./*.sh)的区别

linux下sh文件的运行