<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Terminal on Ricky</title><link>https://linzeyan.github.io/zh-tw/categories/terminal/</link><description>Recent content in Terminal on Ricky</description><generator>Hugo -- gohugo.io</generator><language>zh-tw</language><lastBuildDate>Fri, 09 Jan 2026 16:11:33 +0800</lastBuildDate><atom:link href="https://linzeyan.github.io/zh-tw/categories/terminal/index.xml" rel="self" type="application/rss+xml"/><item><title>終端機如何運作</title><link>https://linzeyan.github.io/zh-tw/posts/2026/20260109-how-terminals-work/</link><pubDate>Fri, 09 Jan 2026 16:11:33 +0800</pubDate><guid>https://linzeyan.github.io/zh-tw/posts/2026/20260109-how-terminals-work/</guid><description>&lt;ul>
&lt;li>&lt;a href="https://how-terminals-work.vercel.app/" target="_blank" rel="noopener">終端機如何運作&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>我覺得好用的 iTerm2 功能</title><link>https://linzeyan.github.io/zh-tw/posts/2025/20250209-iterm2-features-i-find-useful/</link><pubDate>Sun, 09 Feb 2025 08:52:00 +0800</pubDate><guid>https://linzeyan.github.io/zh-tw/posts/2025/20250209-iterm2-features-i-find-useful/</guid><description>&lt;ul>
&lt;li>&lt;a href="https://danielde.dev/blog/iterm2-features-i-find-useful" target="_blank" rel="noopener">我覺得好用的 iTerm2 功能&lt;/a>&lt;/li>
&lt;/ul>
&lt;ol>
&lt;li>顯示時間戳記 ==&amp;gt; &lt;code>⌘+Shift+E&lt;/code>&lt;/li>
&lt;li>在下一個提示時提醒 ==&amp;gt; &lt;code>⌘+Option+A&lt;/code>&lt;/li>
&lt;li>在提示之間跳轉 ==&amp;gt; &lt;code>⌘+Shift+Down&lt;/code>&lt;/li>
&lt;li>逐行捲動快捷鍵 ==&amp;gt; &lt;code>⌘+Up&lt;/code> and &lt;code>⌘+Down&lt;/code>&lt;/li>
&lt;li>用快捷鍵重新排列分頁 ==&amp;gt; &lt;code>Ctrl+Shift+B&lt;/code> and &lt;code>Ctrl+Shift+F&lt;/code>&lt;/li>
&lt;/ol></description></item><item><title>終端機程式遵循的規則</title><link>https://linzeyan.github.io/zh-tw/posts/2024/20241225-terminal-rules/</link><pubDate>Wed, 25 Dec 2024 08:45:00 +0800</pubDate><guid>https://linzeyan.github.io/zh-tw/posts/2024/20241225-terminal-rules/</guid><description>&lt;ul>
&lt;li>
&lt;p>&lt;a href="https://jvns.ca/blog/2024/11/26/terminal-rules/" target="_blank" rel="noopener">終端機程式遵循的「規則」&lt;/a>&lt;/p>
&lt;/li>
&lt;li>
&lt;p>規則 1：非互動程式應在按 Ctrl-C 時退出&lt;/p>
&lt;/li>
&lt;li>
&lt;p>規則 2：按 q 時，TUI 應退出&lt;/p>
&lt;/li>
&lt;li>
&lt;p>規則 3：在空白行上按 Ctrl-D 時，REPL 應退出&lt;/p>
&lt;/li>
&lt;li>
&lt;p>規則 4：不要使用超過 16 種顏色&lt;/p>
&lt;/li>
&lt;li>
&lt;p>規則 5：支援 readline 鍵綁定&lt;/p>
&lt;ul>
&lt;li>規則 5.1：Ctrl-W 應刪除最後一個單字&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>規則 6：寫入管道時停用顏色&lt;/p>
&lt;/li>
&lt;li>
&lt;p>規則 7：- 表示 stdin/stdout&lt;/p>
&lt;/li>
&lt;/ul></description></item><item><title>讓終端機下雪的 Python 腳本</title><link>https://linzeyan.github.io/zh-tw/posts/2023/20231224-snow/</link><pubDate>Sun, 24 Dec 2023 15:40:00 +0800</pubDate><guid>https://linzeyan.github.io/zh-tw/posts/2023/20231224-snow/</guid><description>&lt;ul>
&lt;li>&lt;a href="https://github.com/sontek/snowmachine" target="_blank" rel="noopener">讓終端機下雪的 Python 腳本&lt;/a>&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>docker run --rm -ti sontek/snowmachine tree --color rainbow --particle &lt;span style="color:#e6db74">&amp;#34;*&amp;#34;&lt;/span> --snow true --lights-color rainbow
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>使用終端機與 SSH 連線到遠端主機</title><link>https://linzeyan.github.io/zh-tw/posts/2023/20231124-ssh/</link><pubDate>Fri, 24 Nov 2023 22:22:00 +0800</pubDate><guid>https://linzeyan.github.io/zh-tw/posts/2023/20231124-ssh/</guid><description>&lt;h1 id="使用終端機與-ssh-連線到遠端主機">使用終端機與 SSH 連線到遠端主機&lt;/h1>
&lt;h2 id="1-現代終端機">1. 現代終端機&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://github.com/vercel/hyper" target="_blank" rel="noopener">Hyper&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://iterm2.com/" target="_blank" rel="noopener">iTerm2&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/Eugeny/tabby" target="_blank" rel="noopener">Tabby&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.warp.dev/" target="_blank" rel="noopener">Warp&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/wez/wezterm" target="_blank" rel="noopener">Wez&amp;rsquo;s Terminal&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/kingToolbox/WindTerm" target="_blank" rel="noopener">WindTerm&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="2-在-macos-開啟終端機">2. 在 macOS 開啟終端機&lt;/h2>
&lt;ol>
&lt;li>按 &lt;code>⌘ + space&lt;/code> 開啟 Spotlight
&lt;img src="https://linzeyan.github.io/posts/2023/20231124-ssh/pics/auto_20231124_222253.png" alt="">&lt;/li>
&lt;li>搜尋 terminal.app
&lt;img src="https://linzeyan.github.io/posts/2023/20231124-ssh/pics/auto_20231124_222316.png" alt="">&lt;/li>
&lt;li>按下 &lt;code>↩&lt;/code>
&lt;img src="https://linzeyan.github.io/posts/2023/20231124-ssh/pics/auto_20231124_222410.png" alt="">&lt;/li>
&lt;/ol>
&lt;h2 id="3-使用-ssh-連線到遠端主機">3. 使用 SSH 連線到遠端主機&lt;/h2>
&lt;ol>
&lt;li>確認私鑰檔案路徑。&lt;/li>
&lt;li>在終端機輸入指令：&lt;code>ssh -i /path/to/private_key.pem ubuntu@ubuntu.host.com&lt;/code>&lt;/li>
&lt;/ol></description></item><item><title>Rust 入門！強化終端的現代跨平台命令列工具</title><link>https://linzeyan.github.io/zh-tw/posts/2023/20230113-rust-terminal-tools-linux-mac-windows-fish-zsh/</link><pubDate>Fri, 13 Jan 2023 16:51:01 +0800</pubDate><guid>https://linzeyan.github.io/zh-tw/posts/2023/20230113-rust-terminal-tools-linux-mac-windows-fish-zsh/</guid><description>&lt;ul>
&lt;li>&lt;a href="https://deepu.tech/rust-terminal-tools-linux-mac-windows-fish-zsh/" target="_blank" rel="noopener">Rust 入門！強化終端的現代跨平台命令列工具&lt;/a>&lt;/li>
&lt;/ul>
&lt;h4 id="alacritty">&lt;a href="https://github.com/alacritty/alacritty" target="_blank" rel="noopener">Alacritty&lt;/a>&lt;/h4>
&lt;p>Alacritty 是一款跨平台的現代終端機模擬器，具備合理的預設值。它有 GPU 加速、速度快，且高度可自訂，可在 Linux、macOS 與 Windows 上使用。&lt;/p>
&lt;h4 id="bat">&lt;a href="https://github.com/sharkdp/bat" target="_blank" rel="noopener">bat&lt;/a>&lt;/h4>
&lt;p>bat 是這份清單中我最喜歡的工具之一，用來取代 cat。&lt;/p>
&lt;h4 id="dust">&lt;a href="https://github.com/bootandy/dust" target="_blank" rel="noopener">dust&lt;/a>&lt;/h4>
&lt;p>dust 是 du 指令的替代品，速度快，並提供更好的磁碟使用量視覺化體驗。&lt;/p>
&lt;h4 id="ripgrep">&lt;a href="https://github.com/BurntSushi/ripgrep" target="_blank" rel="noopener">ripgrep&lt;/a>&lt;/h4>
&lt;p>ripgrep（rg）是以行為單位的搜尋工具，會遞迴搜尋目前目錄中的正則比對內容。它比 grep 更快，並支援壓縮檔搜尋、輸出著色、智慧大小寫、檔案類型過濾、多執行緒等功能。&lt;/p>
&lt;h4 id="topgrade">&lt;a href="https://github.com/topgrade-rs/topgrade" target="_blank" rel="noopener">Topgrade&lt;/a>&lt;/h4>
&lt;p>Topgrade 是很棒的工具，適合想要讓系統保持最新狀態的人。&lt;/p></description></item><item><title>超簡單！快速打造漂亮又好用的 zsh 終端環境</title><link>https://linzeyan.github.io/zh-tw/posts/2021/20211009-zsh/</link><pubDate>Thu, 07 Oct 2021 08:44:18 +0800</pubDate><guid>https://linzeyan.github.io/zh-tw/posts/2021/20211009-zsh/</guid><description>&lt;ul>
&lt;li>&lt;a href="https://medium.com/@white1033/%E8%B6%85%E7%B0%A1%E5%96%AE-%E5%BF%AB%E9%80%9F%E6%89%93%E9%80%A0%E6%BC%82%E4%BA%AE%E5%8F%88%E5%A5%BD%E7%94%A8%E7%9A%84-zsh-%E7%B5%82%E7%AB%AF%E7%92%B0%E5%A2%83-c81874368264" target="_blank" rel="noopener">超簡單！快速打造漂亮又好用的 zsh 終端環境&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://dwye.dev/post/zsh-zim-powerlevel10k/" target="_blank" rel="noopener">用 zsh + zim + powerlevel10k 讓你的 Terminal 潮又快&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://medium.com/starbugs/%E6%89%93%E9%80%A0-10x-engineer-zsh-shell-97e40db76391" target="_blank" rel="noopener">打造 10X Engineer Shell 工作環境&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>使用 oh-my-posh 美化 PowerShell 樣式</title><link>https://linzeyan.github.io/zh-tw/posts/2020/20201210-setting-powershell-theme-with-oh-my-posh/</link><pubDate>Thu, 10 Dec 2020 13:15:59 +0800</pubDate><guid>https://linzeyan.github.io/zh-tw/posts/2020/20201210-setting-powershell-theme-with-oh-my-posh/</guid><description>&lt;ul>
&lt;li>&lt;a href="https://blog.poychang.net/setting-powershell-theme-with-oh-my-posh/" target="_blank" rel="noopener">使用 oh-my-posh 美化 PowerShell 樣式&lt;/a>&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-powershell" data-lang="powershell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># 這會從 PowerShell Gallery 下載並安裝 posh-git 和 oh-my-posh 這兩個模組，前者是在命令列中顯示 Git 專案的相關資訊，後者則是美美的樣式套件&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Install-Module posh-git -Scope CurrentUser
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Install-Module oh-my-posh -Scope CurrentUser
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># 接著我們要修改 PowerShell 啟動時所載入的設定檔，在 PowerShell 中輸入 $PROFILE 可得到當前使用者啟動 PowerShell 時，會載入的個人設定檔位置。&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># 你的電腦可能沒有這個實體檔案，這時可以執行下面的指令，如果沒有該設定檔，則建立一個，然後使用 notepad 來開啟該設定檔。&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">if&lt;/span> (!(Test-Path -Path $PROFILE )) { New-Item -Type File -Path $PROFILE -Force }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>notepad $PROFILE
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>最後在該設定檔中加入下列指令&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-powershell" data-lang="powershell">&lt;span style="display:flex;">&lt;span>Import-Module posh-git
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Import-Module oh-my-posh
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Set-Theme Paradox
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>oh-my-posh 內建了很多樣式，你也可以使用 Get-Theme 這個 Cmdlet 指令取得 oh-my-posh 有提供的所有樣式及相關檔案位置&lt;/p></description></item></channel></rss>