ubuntu20.04 重装系统脚本

原创
2020/12/23 20:09
阅读数 854

1.bash.tcl

apt update
apt update
apt install -y vim
apt install -y ibus-rime
apt install -y curl
apt install -y net-tools
apt install -y gdebi

apt install -y docker.io
    usermod -aG docker ${USER}
    chmod a+rw /var/run/docker.sock

wget -O- https://deepin-wine.i-m.dev/setup.sh | sh
apt install -y com.qq.weixin.deepin
apt install -y gnome-shell-extension-top-icons-plus gnome-tweaks
apt install -y libjpeg62:i386

apt install -y texlive-full

apt install -y syncthing
apt install -y shadowsocks-libev
    sed -i 's/"::1", "127.0.0.1"/"45.58.38.21"/g' /etc/shadowsocks-libev/config.json
    sed -i 's/8388/10088/g' /etc/shadowsocks-libev/config.json
    sed -i '6d' /etc/shadowsocks-libev/config.json
    sed -i '5a \ \ \ \ "password":"lizhen",' /etc/shadowsocks-libev/config.json
    sed -i 's/chacha20-ietf-poly1305/aes-256-cfb/g' /etc/shadowsocks-libev/config.json

sed -i '12a \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <family>Noto Sans CJK JP</family>' /etc/fonts/conf.d/64-language-selector-prefer.conf
sed -i '23a \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <family>Noto Serif CJK JP</family>' /etc/fonts/conf.d/64-language-selector-prefer.conf
sed -i '34a \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <family>Noto Sans Mono CJK JP</family>' /etc/fonts/conf.d/64-language-selector-prefer.conf
sed -i '7d;19d;30d' /etc/fonts/conf.d/64-language-selector-prefer.conf


gdebi -n google-chrome-stable_current_amd64.deb
gdebi -n nomachine_6.11.2_1_amd64.deb
gdebi -n synergy_1.11.1.stable_b5855ec3105_ubuntu18_amd64.deb
gdebi -n baidunetdisk_3.3.2_amd64.deb
gdebi -n copytranslator_9.1.0_amd64.deb
gdebi -n flameshot_0.6.0_bionic_x86_64.deb
gdebi -n freedownloadmanager.deb
gdebi -n code_1.52.1-1608136922_amd64.deb

gdebi -n wps-office_11.1.0.9719_amd64.deb
    cp simhei.ttf /usr/share/fonts/wps-office/

cp -r frp_0.34.3_linux_amd64 /home/zli
    chmod +x /home/zli/frp_0.34.3_linux_amd64/frps
    chmod +x /home/zli/frp_0.34.3_linux_amd64/frpc
cp rc.local /etc

#echo >> /lib/systemd/system/rc-local.service
#echo "[Install]" >> /lib/systemd/system/rc-local.service
#echo "WantedBy=multi-user.target" >> /lib/systemd/system/rc-local.service
#echo "Alias=rc-local.service" >> /lib/systemd/system/rc-local.service
chmod +x /etc/rc.local
#ln -s /lib/systemd/system/rc-local.service /etc/systemd/system/


apt install -y ttf-mscorefonts-installer

chmod +x FoxitReader.enu.setup.2.4.4.0911.x64.run
./FoxitReader.enu.setup.2.4.4.0911.x64.run

实测不需要加[Install]以及ln -s那些,只需要配合rc.local即可。
Foxit那里不能有(r0864)之类的,bash的时候会报语法错误。

2.rc.local

#!/bin/sh

#/usr/bin/synergy &
#/usr/bin/syncthing -no-browser&
/usr/bin/ss-local -c /etc/shadowsocks-libev/config.json &
/home/zli/frp_0.34.3_linux_amd64/frps -c /home/zli/frp_0.34.3_linux_amd64/frps.ini &
/home/zli/frp_0.34.3_linux_amd64/frpc -c /home/zli/frp_0.34.3_linux_amd64/frpc.ini &

exit 0

synergy和syncthing在rc.local中无法启动,最后用Startup Application才成功的,可能是与某些硬件的启动先后关系有依赖。
-no-browser要加上,不然每次开机都会弹出浏览器。
synergy要勾选Hide on Start Up

3.在bash文件夹中

sudo bash bash.tcl
展开阅读全文
加载中

作者的其它热门文章

0
0 收藏
分享
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部