Windows 完全求生指南 by Inndy

https://github.com/Inndy/windows-sucks

更換 source

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo vim /etc/apt/sources.list
:%s/archive.ubuntu.com/tw.archive.ubuntu.com/g

更新

sudo apt update
sudo apt upgrade

Linuxbrew

sudo apt-get install build-essential curl file git
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
echo 'eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >> ~/.profile
. ~/.profile

linuxbrew 設定

brew doctor
sudo mkdir -p /home/linuxbrew/.linuxbrew/var/homebrew/linked
sudo chown -R $(whoami) /home/linuxbrew/.linuxbrew/var/homebrew/linked
echo 'umask 002' >> ~/.bash_profile
. ~/.bash_profile
brew doctor

安裝 Fish & 預設 fish

sudo apt-add-repository ppa:fish-shell/release-3
sudo apt install fish
chsh -s /usr/bin/fish 

Oh my fish

curl -L https://get.oh-my.fish | fish

fish 主題

omf install agnoster
omf theme agnoster

Linuxbrew + fish

echo 'eval (/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >> ~/.config/fish/config.fish
. ~/.config/fish/config.fish
brew doctor
echo 'umask 002' >> ~/.config/fish/config.fish
. ~/.config/fish/config.fish
brew doctor

Fish greeting message

~/.config/fish/config.fish

set fish_greeting ""

sudo no password

sudo visudo

%sudo ALL=(ALL:ALL) ALL 改成 %sudo ALL=(ALL:ALL) NOPASSWD:ALL

Powerline font

git clone https://github.com/powerline/fonts

VsCode settings.json

{
  "terminal.integrated.shell.windows": "C:/WINDOWS/system32/wsl.exe",
  "terminal.integrated.fontFamily": "'Source Code Pro for Powerline'",
  "workbench.colorCustomizations": {
  		// https://glitchbone.github.io/vscode-base16-term/#/solarflare
  		// Solarflare
        "terminal.background": "#18262F",
        "terminal.foreground": "#A6AFB8",
        "terminalCursor.background": "#A6AFB8",
        "terminalCursor.foreground": "#A6AFB8",
        "terminal.ansiBlack": "#18262F",
        "terminal.ansiBlue": "#33B5E1",
        "terminal.ansiBrightBlack": "#667581",
        "terminal.ansiBrightBlue": "#33B5E1",
        "terminal.ansiBrightCyan": "#52CBB0",
        "terminal.ansiBrightGreen": "#7CC844",
        "terminal.ansiBrightMagenta": "#A363D5",
        "terminal.ansiBrightRed": "#EF5253",
        "terminal.ansiBrightWhite": "#F5F7FA",
        "terminal.ansiBrightYellow": "#E4B51C",
        "terminal.ansiCyan": "#52CBB0",
        "terminal.ansiGreen": "#7CC844",
        "terminal.ansiMagenta": "#A363D5",
        "terminal.ansiRed": "#EF5253",
        "terminal.ansiWhite": "#A6AFB8",
        "terminal.ansiYellow": "#E4B51C"
}

More for Ubuntu

美化

https://medium.com/@hong0308/ubuntu-mac-69eb6995dde5

開機美化

git clone https://github.com/vinceliuice/grub2-themes
cd grub2-themes
sudo ./install.sh -s -2

登入界面美化

sudo vim /etc/alternatives/gdm3.css

#lockDialogGroup 改成

#lockDialogGroup {
  background: #2c001e url(file:///usr/share/backgrounds/bg.jpg);         
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center; 
}

grub customizer

install

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

uninstall

sudo apt-get remove --autoremove grub-customizer

電源管理

TLP

sudo apt install tlp

sudo add-apt-repository ppa:linuxuprising/apps
sudo apt install tlpui
sudo apt remove --autoremove tlpui

Powertop

sudo apt install powertop