zoukankan      html  css  js  c++  java
  • ubuntu 自动配置脚本

    以Ubuntu 18.04为例

    #! /bin/bash

    #set -x

    if [ ! -d ~/Workshop ]; then
    mkdir ~/Workshop
    fi
    cd ~/Workshop

    cp /etc/apt/sources.list /etc/apt/sources.list.bak
    echo deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse > /etc/apt/sources.list
    echo deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse >> /etc/apt/sources.list
    echo deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse >> /etc/apt/sources.list
    echo deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse >> /etc/apt/sources.list
    echo deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse >> /etc/apt/sources.list
    echo deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse >> /etc/apt/sources.list
    echo deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse >> /etc/apt/sources.list
    echo deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse >> /etc/apt/sources.list
    echo deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse >> /etc/apt/sources.list
    echo deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse >> /etc/apt/sources.list

    apt update
    apt upgrade -y

    apt install vim -y
    apt install vim-gtk -y
    apt install libcanberra-gtk-module -y

    apt install git -y
    apt install bridge-utils -y


    apt install build-essential -y
    apt install gdb-multiarch -y
    apt install gcc-arm-none-eabi -y
    apt install gcc-arm-linux-gnueabi -y
    apt install gcc-arm-linux-gnueabihf -y
    apt install g++-arm-linux-gnueabi -y
    apt install g++-arm-linux-gnueabihf -y

    echo "install gcc-5 g++-5"
    apt install gcc-5 gcc-5-multilib g++-5 g++-5-multilib -y
    update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 50 --slave /usr/bin/g++ g++ /usr/bin/g++-5
    update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 70 --slave /usr/bin/g++ g++ /usr/bin/g++-7
    update-alternatives --config gcc


    echo "install ssh-server"
    dpkg -l | grep ssh
    apt install openssh-server -y


    echo "install VS Code"
    if [ ! -f "./VS_Code_amd64.deb" ]; then
    wget -c "https://go.microsoft.com/fwlink/?LinkID=760868" -O "VS_Code_amd64.deb"
    fi
    dpkg -i VS_Code_amd64.deb


    echo "qemu "
    apt install libsdl2-dev -y
    apt install libpixman-1-dev -y

    echo "install qemu"
    if [ ! -f "./qemu-5.1.0.tar.xz" ]; then
    wget -c "https://download.qemu.org/qemu-5.1.0.tar.xz" -O "qemu-5.1.0.tar.xz"
    fi
    tar xJf qemu-5.1.0.tar.xz
    cd qemu
    ./configure --prefix=/usr/local/qemu
    make -j8
    make install
    ln -s /usr/local/qemu/bin/* /usr/local/bin/

    apt install scons -y
    apt install cmake -y


    apt autoremove




  • 相关阅读:
    国家标准比例尺地形图说明(摘要自SuperMap Objects Document)
    常用日期函数
    CMD执行BCP命令
    如何利用.snk文件生成DLL文件中的Publickeytoken
    SQL SERVER数据库的表中修改字段属性被阻止“Prevent saving changes that require table recreation”
    如何生成DLL文件
    如何反编译DLL文件
    Visual Studio 2022激活密钥
    sqlserver跨数据库查询
    jQuery对象与DOM对象之间的转换
  • 原文地址:https://www.cnblogs.com/sinferwu/p/13976132.html
Copyright © 2011-2022 走看看