2022/02/14
SVN 筆記
2022/01/26
Mount sshfs on linux or windows
Linux
If you want to give the host direct access in WSL, you need to enable user_allow_other.
Uncomment user_allow_other
#id -g aimwang
Windows
2022/01/24
使用 WSL2 建構 Ubuntu 16.04 的環境
安裝
公司的編譯伺服器使用 Ubuntu 16.04, 為了減低編譯環境造成的影響, 所以在本機編譯環境也採用相同的版本.
Windows Store 沒有提供 Ubuntu 16.04, 所以要手動安裝
1. 下載 Ubuntu 16.04 的 appx. (連結)
2. 執行 Windows PowerShell, 切換到下載目錄.
3. 在 PowerShell 裡面執行 Add-AppxPackage .\Ubuntu_1604.2019.523.0_x64.appx
完成後就可以看到 Ubuntu 16.04 的應用程式. 第一次執行要設定使用者.
檔案系統
sudo 免密碼
固定IP
auto eth0iface eth0 inet staticaddress 172.19.240.2netmask 255.255.240.0gateway 172.19.240.1dns-nameservers 172.19.240.1
[host 端的 vEthernet 沒有固定 IP 無意義]
執行, 或加入開機 task
wsl -d Ubuntu-16.04 -u root ifconfig eth0 172.19.240.2 netmask 255.255.240.0
wsl -d Ubuntu-16.04 -u root rout add default gw 172.19.240.1
啟動 SSH server
重新啟動
解除安裝
安裝開發基本包
編譯錯誤訊息與解方
fatal error: sys/cdefs.h: No such file or directory
fatal error: openssl/ssl.h: No such file or directory
compilation terminated.
cannot find -lasound
cannot find -lstdc++
cannot find -lgcc_s
cannot find -lgcc
Please install ncurses. (Missing libncurses.so or ncurses.h)
Please install 'unzip'
fatal: unable to access 'xxx': server certificate verification failed.
"__DATE__" might prevent reproducible builds
"__TIME__" might prevent reproducible builds
2021/07/13
Ubuntu 20.04 在 Command line 模式設定 static ip
在沒有桌面環境的情況下, 只能用 command line 模式設定網路介面.
Ubuntu 是透過 netplan 來設定.
#sudo nano /etc/netplan/01-network-manager-all.yaml
以下內容設定 enp8s0
ip: 192.168.1.140/24
gw: 192.168.1.1
dns: 8.8.8.8 1.1.1.1
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: networkd
ethernets:
enp8s0:
addresses: [192.168.1.140/24]
gateway4: 192.168.1.1
nameservers:
addresses: [8.8.8.8, 1.1.1.1]
修改完成後可以 apply 立即生效
2021/07/09
Geany 搭配 sshfs-win 儲存檔案時出現 Permission denied 的解決方法
使用sshfs比samba安全方便. 但是 Geany 存取 sshfs-win 掛載進來的檔案, 在存檔時會抱怨 Permission denied.
解決的方式是撤銷 use_gio_unsafe_file_saving. 操作如下:
1. 拉下【編輯(E)】選單, 點擊【偏好設定(S)】
2. 切換到【各種類型】, 取消勾選 files.use_gio_unsafe_file_saving. 然後套用並確定.

