Python 的套件使用 pip / pip3 安裝,在安裝新套件後,執行發現之前的版本太舊,於是要來做 PIP Package 升級~
標籤: linux
Linux Samba 讓 Apple TV 能支援連線
Debian Linux 升級到 bullseye 後,Apple TV 就無法連到 SAMBA 了,要怎麼解決呢?
- 註:我是在 Apple TV 使用「Elmedia Video Player」連 Linux 的 SAMBA Server
於 Linux 使用 Python PIP3 安裝 TA-Lib
Python3 的 TA-Lib 有很多技術分析的函數(Function) 已經寫好,可以直接套用。
不過 TA-Lib 於 Debian Linux 要直接 pip3 install 會遇到點困難~
在 Gnome 建立 Facebook Messenger Apps
使用 Franz、Rambox 這些綜合的套件,隨著每個都被禁止使用 (Slack 也不允許被嵌入),所以乾脆拆出來自己做~
此篇的作法是在 Xwindow Gnome 裡面,建立 Facebook Messenger App 的快速連結(Icon),然後會自動使用瀏覽器開啟網頁,達到類似的效果~
快速找出 Linux 佔硬碟空間的檔案
Linux 看到硬碟空間吃緊,df -h 可以看到使用率,但是硬碟容量快速減少,要快速找出到底哪邊大量使用空間,可以依照下述步驟:
- cd / # 切到根目錄,或者到更深入一點的資料夾
- du -h -d1 # 先看哪個資料夾吃最兇,再進去細部查
- cd max-size-directory # 切到使用容量最兇的地方
- du -h -d1 # 一層一層撈,持續重複 2 ~4
- du -sck * | sort -nr | less # 上述大方向抓到,要再查看細部含檔案的時候,由最上面開始看
- realpath filename # 如果有找到檔案,抓取真實路徑後,再來查看是怎麼發生的
ssh 遠端執行 sudo 要如何輸入密碼
SSH 到遠端需要執行 sudo 命令,除了修改 sudoers 外,還有哪些方式可以使用呢?
MySQL Workbench 於 Linux 的安裝與簡易操作
於 Ubuntu Linux 使用 GUI 來畫、看資料庫的 ERD,MySQL 有自己出 Workbench 可以使用~
Linux 遇到 DMAR: DRHD: handling fault status reg 解法
Debian Linux 升級到 bullseye ,重新開機後,dmesg 就看到下述訊息不斷:
batou kernel: DMAR: DRHD: handling fault status reg 3 batou kernel: DMAR: [DMA Read] Request device [05:00.0] fault addr fffe0000 [fault reason 06] PTE Read access is not set
要怎麼解決呢?
Linux Shell Debug mode 開啟
Linux 常會需要寫 Shell script,但是遇到問題 Debug 還蠻麻煩的,要怎麼開啟 Debug mode (trace mode)
可以使用 -x 來協助 Debug
- /bin/sh -x # xtrace
- /bin/bash -x # Print commands and their arguments as they are executed.
Systemd 遇到 Start request repeated too quickly 修復
Linux 啟動、結束程式或程式自動重啟等等,都可以使用 systemd 來處理,但是遇到下述的問題要怎麼解決呢?
- 11月 21 12:04:09 w1 systemd[1]: monitor_error.service: Start request repeated too quickly.
- 11月 21 12:04:09 w1 systemd[1]: monitor_error.service: Failed with result 'start-limit-hit'.
- "start-limit-hit"
- A start limit was defined for the unit and it was hit, causing the unit to fail to start.
- See systemd.unit(5)'s StartLimitIntervalSec= and StartLimitBurst= for details.