###### tags: `ubuntu` :::spoiler Contents [TOC] ::: # Ubuntu Settings ## :shield: Update Ubuntu Softwares / Security - Login **LivePatch** - Run update with **Software Updater** ## :keyboard: Preliminary Works - Install by **Ubuntu Software** - :mag: dconf - :package: Synaptic Package Manager - :recycle: BleachBut - :notebook: cherrytree (see [tutorial](https://youtu.be/HFeW4Cj5k1s)) - :musical_note: spotify - :headphones: Clementine Music Player <!-- - :art: GNU Image Manipulation Program (GIMP) --> - Install by `dpkg` - [VSCode (避免注音無法輸入問題)](https://code.visualstudio.com/Download) - [Anydesk](https://anydesk.com/en) - Install by `apt-get` or `apt` ```shell=1 # Update software lists sudo apt update ## 更新軟體的最新資訊及列表 sudo apt upgrade ## 更新目前已安裝的軟體到最新版本 # Basic Tools sudo apt install curl ## Resource Monitor sudo apt install htop sudo apt install iftop ## Ubuntu Cleaner sudo add-apt-repository ppa:gerardpuig/ppa sudo apt update sudo apt install ubuntu-cleaner # Multi-pane for terminal sudo apt install tmux sudo apt install byobu # Coding sudo apt install vim git sudo apt install build-essential sudo apt install manpages-dev ``` ```shell=23 # Media Player sudo add-apt-repository ppa:xuzhen666/gnome-mpv sudo apt update sudo apt install celluloid # Picture Editor sudo apt install pinta # Simple sudo apt install gimp # Pro # Microsoft Edge sudo apt install microsoft-edge-stable ``` :::info **備註** - [Celluloid (formerly GNOME MPV)](https://launchpad.net/~xuzhen666/+archive/ubuntu/gnome-mpv) - [Celluloid install step](https://youtu.be/MNX7HgcWqHc?t=861) - [LINE](https://hackmd.io/@yizhewang/B1T66WmTu) ::: ## :desktop_computer: 雙系統相關設定 ### 設定 Grub Customizer * 安裝 Grub Customizer 指令 ``` sudo apt update ## 更新軟體的最新資訊及列表 sudo apt upgrade ## 更新目前已安裝的軟體到最新版本 sudo apt install grub-customizer ``` :::danger **Trouble Shooting:** [Get grub menu back after installing Ubuntu 20.04 alongside Windows](https://medium.com/@leijerry888/get-grub-menu-back-after-installing-ubuntu-20-04-alongside-windows-dab5de5afc37) ::: ### 避免雙系統的時區不同步 - [Tutorial](https://medium.com/caesars-study-review-on-web-development/win10-and-ubuntu-%E9%9B%99%E7%B3%BB%E7%B5%B1%E5%AE%89%E8%A3%9D%E7%AD%86%E8%A8%98-bc824bef7fb4) ```terminal # 將你的硬體時鐘設置為協調世界時(UTC) $ timedatectl set-local-rtc 1 # 確定你的硬體時鐘是否設置為本地時區 $ timedatectl | grep local ``` >RTC in local TZ: yes Warning: The system is configured to read the RTC time in the local time zone. 'timedatectl set-local-rtc 0'. :::success 看到以上的訊息就代表成功了 ::: ## :shell: Shell Settings :::success **Install [oh-my-zsh (powerlevel9k)](http://jr0cket.co.uk/2017/08/beautiful-terminalation-ohmyzsh-on-ubuntu.html)** ::: ```teminal $ sudo apt install zsh $ sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" $ git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k ``` Edit the `./zshrc` file and set the theme to powerlevel9k ```=11 ZSH_THEME="powerlevel9k/powerlevel9k" ``` ## :page_facing_up: Copy Setting Files :::info - .bashrc - .bash_aliases - .zshrc # 使用者名稱要改 - .vimrc - .tmux.conf - .gitconfig # Double Check ::: :::spoiler - .bash_history - .zsh_history ::: ## :floppy_disk: 自動掛載外部磁區 1. [[Ubuntu] 自動掛載硬碟或磁區](http://francinelin.blogspot.com/2015/01/ubuntu.html) 2. Hide the icons of the mounted disks * [For Ubuntu 20.04](https://www.omgubuntu.co.uk/2019/11/hide-mounted-drives-ubuntu-dock) ```termianl $ gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts false ``` * [For Ubuntu 18.04](https://askubuntu.com/questions/1108204/how-to-hide-mounted-drives-from-ubuntu-18-04-desktop) ```termianl $ gsettings set org.gnome.nautilus.desktop volumes-visible 'false' ``` ## Gnome Settings (UI) ### 新酷音輸入法 * [Installation Guidance](https://medium.com/@scofield44165/ubuntu-20-04%E4%B8%AD%E6%96%B0%E5%A2%9E%E6%96%B0%E9%85%B7%E9%9F%B3%E8%BC%B8%E5%85%A5%E6%B3%95-add-chinese-chewing-in-ubuntu-20-04-5ce78563638b) * Settings :::success 打開 **設定值** / **地區與語言** / **中文(新酷音):gear:** / **編輯** :black_large_square: **取消勾選**:Caps Lock 切換中文模式 ::: ### 設定線上帳號 :::success 打開 **設定值** / **線上帳號** - 登入 Google 帳號來啟用 GD 虛擬磁碟(授權給 GNOME) ::: ### :mag: Dconf | 路徑 | Default :ballot_box_with_check:|:black_large_square: | 自訂數值 | 備註| | -------- | -------- | -------- | -------- | | `click-action` | :black_large_square: | `minimize-or-previews` | [Activate minimize to Dock] | | `org/gnome/settings-daemon/plugins/media-keys/terminal` | :black_large_square: | `['<Primary><Alt>t','<Super>t']` | 增加 Terminal 快捷鍵 | | `switch-to-workspace-up` | :black_large_square: | `['<Super>Page_Up', '<Control><Super>Up']` | [vscode 快捷鍵衝突] | | `switch-to-workspace-down` | :black_large_square: | `['<Super>Page_Down', '<Control><Super>Down']` | [vscode 快捷鍵衝突] | | `move-to-workspace-up` | :black_large_square: | `['<Super><Shift>Page_Up']` | [vscode 快捷鍵衝突] | | `move-to-workspace-down` | :black_large_square: | `['<Super><Shift>Page_Down']` | [vscode 快捷鍵衝突] | [Activate minimize to Dock]:https://www.youtube.com/watch?v=MNX7HgcWqHc&t=136s [vscode 快捷鍵衝突]:https://unix.stackexchange.com/questions/394143/how-to-disable-gnome-ctrlaltdown-and-ctrlaltup-shortcut/420395 ### Keyboard Shortcuts :::success 打開 **設定值** / **鍵盤快速鍵** ::: | 名稱 | 指令 | 快速鍵 | 欄位分類 | | ---------------- | ---------------------- | ---------------- | ---------- | | 設定值 | :no_entry_sign: | `Super+I` | 啟動器 | | 執行計算機 | :no_entry_sign: | `Super+C` | 啟動器 | | 顯示執行明令提示 | :no_entry_sign: | `Super+R` | 系統 | | [Xkill] | `xkill` | `Super+K` | 自訂快速鍵 | | 檔案總管 | `nautilus -w` | `Super+E` | 自訂快速鍵 | | 系統監控 | `gnome-system-monitor` | `Shift+Ctrl+Esc` | 自訂快速鍵 | [xkill]: https://www.youtube.com/watch?v=MNX7HgcWqHc&t=2140s ### Set `calc` for [Alt-F2 alias](https://askubuntu.com/questions/447057/use-aliases-in-the-alt-f2-dialog) ```terminal # Create file in /usr/bin/ $ sudo sh -c "echo gnome-calculator > /usr/bin/calc" # Make the script executable $ sudo chmod a+x /usr/bin/calc ``` ### 開啟夜光功能 :::success 開啟 **設定值** / **顯示器** / **夜光** ::: ### Nautilus (檔案總管) * [Add "Open Code here" context menu for Nautilus #103412](https://github.com/microsoft/vscode/issues/103412) * [code-nautilus](https://github.com/harry-cpp/code-nautilus) ## 精華版 50 Things to Do After installing Ubuntu 20.04 [:link:](https://youtu.be/MNX7HgcWqHc) ### [4. Decrease Swap use](https://www.youtube.com/watch?v=MNX7HgcWqHc&t=206s) ```terminal $ cat /proc/sys/vm/swappiness ``` :::warning `vm.swappiness=10` ::: ### [5. Reduce SSD Writes](https://www.youtube.com/watch?v=MNX7HgcWqHc&t=354s) ### [12. GNOME Sushi](https://www.youtube.com/watch?v=MNX7HgcWqHc&t=1196s) ### [27. Default applications](https://www.youtube.com/watch?v=MNX7HgcWqHc&t=2495s) ### [38. Enable Netflix support](https://www.youtube.com/watch?v=MNX7HgcWqHc&t=3646s) ## 將 Ubuntu 家目錄資料夾的語言改為英文 - [Tutorial](https://blog.jaycetyle.com/2018/06/ubuntu-home-folder-lang/) ```terminal $ export LANG=en_US $ xdg-user-dirs-gtk-update ``` ## Tmux 詳細設定 * [Tmux Plugins: tpm](https://github.com/tmux-plugins/tpm) * [Restore tmux session after reboot](https://andrewjamesjohnson.com/restoring-tmux-sessions/)
×
Sign in
Email
Password
Forgot password
or
Sign in via Google
Sign in via Facebook
Sign in via X(Twitter)
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
Continue with a different method
New to HackMD?
Sign up
By signing in, you agree to our
terms of service
.