用 defaults 设置访达的默认视图方式

通过 FXPreferredViewStyle 让新开的访达窗口默认以列表、分栏或图库视图显示。

macOSmacOS文件访达defaults 偏好设置中风险
运行 defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv" && killall Finder(Nlsv=列表,icgv=图标,clmv=分栏,glyv=图库)。

01命令

命令
$ defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv" && killall Finder

02作用说明

当文件夹没有单独保存视图设置时,访达会按 FXPreferredViewStyle 打开新窗口。可选值有四个:Nlsv(列表)、icgv(图标)、clmv(分栏)、glyv(图库);列表视图是效率党的经典选择,文件排列整齐还能看到大小和日期。killall Finder 让设置立即生效,无需注销。

03风险

风险中风险
!注意: 手动改过视图的文件夹仍保留自己的设置,此命令只改默认值。

04撤销

撤销
$ defaults delete com.apple.finder FXPreferredViewStyle && killall Finder

05来源

  • macOS defaults - read, write and delete macOS user defaults
    SS64 · technical · 2026-09-17
    依据: Documents `defaults write domain key -string value` for string preference keys and restarting Finder (killall Finder) to apply preference changes.
  • macOS setup dotfiles (.macos)
    mathiasbynens/dotfiles (GitHub) · community · 2026-09-17
    依据: Contains 'defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"' with a comment setting Finder to list view by default.

最后验证: 2026-09-19 · 分类: 文件与文件夹

06相关方案