--- tags: Linux, Ubuntu, raspberrypi --- # Ubuntu 20.04 通用安裝 本土化語言設定與常用套件安裝 ```bash= sudo apt update && sudo apt upgrade -y #常用套件 sudo apt-get install language-pack-zh-han* git vim wget curl make gcc davfs2 samba exfat-fuse nfs-common #本土化語言包設定 sudo dpkg-reconfigure locales #快速配置軟體 sudo apt-get install tasksel # 中文輸入法與小企鵝框架 sudo apt-get install fcitx-chewing # 調校軟體下載,修改系統字體等 sudo apt-get install gnome-tweak-tool ``` ## 通用設定 更改時區 ```bash= sudo dpkg-reconfigure tzdata ``` 可下載桌面,修改`ssh` `samba`等相關設定之tui ```bash= sudo tasksel ``` Ubuntu網路設定 可依據內容進行設定 ```bash= sudo nmtui ``` ## Vim 設定 Vim設定 ```bash= wget https://raw.githubusercontent.com/edwardhome/vim_setting/main/install.sh ``` ## 常用字體安裝 ```bash git clone https://github.com/edwardhome/linux_font.git && cd linux_font && sh ./install.sh ``` ## ZSH 設定 安裝zsh ```bash= sudo apt install zsh chsh -s $(which zsh) wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh && sh install.sh git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k ``` 下載常用套件 ```bash= git clone https://github.com/zsh-users/zsh-completions git clone https://github.com/zsh-users/zsh-autosuggestions git clone https://github.com/zsh-users/zsh-syntax-highlighting ``` 修改`.zshrc` ```bash= vim ~/.zshrc ``` 修改內容如下: ```shell= ZSH_THEME=”powerlevel10k/powerlevel10k” plugins=( git zsh-completions zsh-autosuggestions zsh-syntax-highlighting ) ``` 重新載入並進入`powerlevel10k`設定 ```bash= source ~/.zshrc p10k configure ``` ## RaspberryPi 安裝 Ubuntu 20.04 ### 新增`raspi-config` [參考資料](https://linuxtut.com/en/a252676a3ce6bd1410da/) ```bash= sudo echo "deb http://archive.raspberrypi.org/debian/ buster main" >> /etc/apt/sources.list sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7FA3303E sudo apt-get update sudo apt-get install raspi-config sudo mount /dev/mmcblk0p1 /boot ``` ## gpio設定 [參考資料](https://github.com/guation/WiringPi-arm64) 開啟32bit相容性安裝 ```bash= sudo dpkg --add-architecture armhf sudo apt update sudo apt install wiringpi ``` Build Wiringpi ```bash= git clone https://github.com/guation/WiringPi-arm64.git cd WiringPi-arm64/ ``` 編譯檔案 ```bash= sudo apt install -y gcc-arm-linux-gnueabihf ./build debian sudo apt install -fy ./debian-template/wiringpi-`cat VERSION`.deb ``` 利用指令確認 ```bash= gpio -v ``` 成功! 
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up