在 Debian(以及大多数 Linux 发行版)上,Notepad(Windows 自带的记事本)本身不能直接安装,因为它是 Windows 专用程序。不过有几种常见替代方案,取决于你想做什么:
Notepad++ 是 Windows 上非常流行的编辑器,Linux 上可以通过 Snap 或 Flatpak 安装。
sudo apt update
sudo apt install snapd -y
sudo snap install notepad-plus-plus
注:Snap 版 Notepad++ 是通过 Wine 运行的,体验接近 Windows。
sudo apt install flatpak -y
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub com.notepad_plus_plus.NotepadPlusPlus
如果你只是想要一个简单的记事本:
sudo apt install gedit
sudo apt install mousepad
sudo apt install leafpad
如果你想真的运行 Windows 的 notepad.exe:
sudo apt install wine
wine notepad.exe
你需要自己有 Windows 的 notepad.exe 文件。
sudo apt install code
或从官网下载 .deb 安装。
mousepad / gedit如果你告诉我你是 桌面环境(GNOME/KDE/XFCE) 或 用途(写代码/记笔记),我可以给你更精确的建议。