从源码构建需要先安装 Go 工具链;不内置分页器、编辑器和文件操作命令,需自行配合 shell 工具与外部程序;没有标签页和窗口,多任务要靠窗口管理器或终端复用器
env CGO_ENABLED=0 go install -trimpath -ldflags="-s -w" github.com/gokcehan/lf@latestREADME 未说明,仅要求能运行终端;跨平台支持 Linux、macOS、BSD 和 Windows,不涉及 GPU 或显存
用 Go 写的终端文件管理器,灵感来自 ranger,单二进制无依赖,启动快、占用低
用 Go 写的终端文件管理器,纯键盘操作,启动快、占用低,适合习惯在命令行里浏览和整理文件的人。
核心能力
- 单二进制分发,无任何运行时依赖
- 异步 IO 操作,避免界面卡顿
- 服务端/客户端架构,可远程命令管理多实例
- 用 shell 命令扩展和配置,支持自定义键位
- 默认键位兼容 vi 与 readline
容易踩的坑
- r42最新正式版2026-07-31 · 2026-07-31 07:16 UTC
Changed
- The key
<backspace2>has been renamed to<backspace>formapkeybindings (#2286). .Stat.DirSizeand.Stat.DirCountin the ruler file no longer have a pointer type, and will be set to-1instead ofnilif the corresponding value cannot be determined (#2397).setlocalcommands no longer support the ability to specify recursive directories (#2415). For use cases wheresetlocalshould apply to a directory based on some condition, it is recommended to script this inside theon-loadhook command.- On Windows, files are now considered executable according to
PATHEXTwhen matching colors and icons (#2448). - The
rulerfmtandstatfmtoptions are now marked as deprecated in favor of using the ruler file (configured using therulerfileoption), and will be removed in a future release (#2477). - The client server connection will now exclusively use Unix domain sockets on Windows and no longer fall back to TCP sockets (#2527).
- The fallback location of the server socket (used if
XDG_RUNTIME_DIRis not defined) is changed from/tmp/lf.<user>.sockto/tmp/lf-<uid>/lf.sock, and the containing directory must be owned by the current user (#2532). - The
ignorecaseandignorediaoptions (intended for searching) no longer affect sorting, and insteadsortignorecaseandsortignorediahave been added to customize sorting (#2543). - Previews are now marked as binary if they contain a control character other than bell, backspace, tab, newline, vertical tab, form feed, carriage return, escape or delete (#2561). Previously only null bytes were used to detect binary previews.
Added
- Emoji sequences containing Zero Width Joiner characters are now displayed as a single combined glyph (#2286).
- Key combinations such as
<c-h>and<backspace>can now be distinguished when supported by the terminal (#2286) (#2496). - A new field
.Allis added to therulerfile to display the number of all files (i.e. visible + hidden) in the current working directory (#2376). - A new option
numbercursorfmtis added to further customize the appearance of line numbers (#2395). - The
loading...message delay of 100 milliseconds for file previews is now applied to directories as well (#2410). lfwill now automatically change to the parent directory if the current directory no longer exists and thewatchoption is enabled (#2424).- A new option
terminalcursoris added to customize the appearance of the terminal cursor (#2441). - A new option
borderstyleis added to control whetherdrawboxdraws an outline, separators, or both (#2445). This also replaces the existingroundboxoption.
Fixed
- Previews are now cleaned when changing to an empty directory (#2369).
- The
dircountsindicator for errors is changed back to!instead of?(#2372). - Previews are now correctly updated on
visual-change(#2373). - The
selectcommand can now select files immediately after creation as part of a script (#2377). - The
on-loadhook command now ignores.gitdirectories to reduce flicker and repeatedon-loadtriggers (#2382). - Preview messages like
emptyorloading...have their alignment improved (#2400). - A bug where the
loading...message was not displayed for volatile previews after the first time is now fixed (#2410). - The
cmd-transposecommand now advances the cursor correctly after swapping characters (#2413). - Symbolic links are no longer followed when changing directories (#2423).
- Using the
selectcommand with a blank string as the argument now properly raises an error instead of changing to the parent directory (#2429). - The number of bytes read is now limited for previews that contain extremely long lines (#2458).
- Control characters are now stripped from previews to prevent dangerous terminal sequences from being processed if the default previewer is used (#2459).
- Various fixes have been made to sanitize input data a
- The key
- r412026-02-04 · 2026-02-04 05:50 UTC
查看更新说明
Changed
- The
previewerscript no longer skips non-regular files (#2327). - Line numbers now take up less space when both
numberandrelativenumberare enabled (#2331). - Changes have been made to ruler configuration (#2338):
- The ruler file is no longer experimental.
- The ruler file will be used by default unless
rulerfmt(now a blank string by default) is specified. - The ruler file is no longer read from fixed locations like
~/.config/lf/ruler, and instead therulerfileoption has been repurposed to specify the path of the ruler file.
Added
- A new server command
listis added to print the IDs of all currently connected clients (#2314). - The
previewerandcleanerscripts now have theirstderroutput logged (#2316). - The
rulerfile now supports.Stat.Extension,.Stat.AccessTime,.Stat.BirthTime,.Stat.ChangeTimeand.Stat.CustomInfo(#2329), as well as.Stat.DirSizeand.Stat.DirCount(#2343). - A new option
mergeindicatorsis added to reduce the gap before filenames, by merging tag and selection indicators into a single column (#2330).
Fixed
- A bug where sixel images fail to display when scrolling back and forth is now fixed (#2301).
- Newline characters are now ignored when drawing the ruler with the
rulerfile configured (#2319). - A potential crash when using the
scroll-up/scroll-downcommands is now fixed (#2320). - Case-insensitive command-line completions no longer cause user input to be displayed in lowercase (#2336).
- Calculation of window widths for the
ratiosoption is now more accurate (#2347).
- The
- r402025-12-10 · 2025-12-10 03:48 UTC
查看更新说明
Fixed
- Error messages from the server are no longer written to the terminal which causes the UI to break (#2290).
- A bug where file previews fail to load properly when scrolling quickly is now fixed (#2292).
- r392025-12-01 · 2025-12-01 13:33 UTC
查看更新说明
Changed
- File extensions are now shown for long filenames even if they are truncated (#2159).
- The history file will no longer contain a space between the prefix and the actual command (e.g.
:quitinstead of: quit) for each line (#2161). The commandsed -i -E 's/^(.) /\1/' ~/.local/share/lf/historycan be run to make an existing history file compatible with the new format. - The
cmd-history-nextandcmd-history-prevcommands will now select only matching entries if part of the command is typed beforehand (#2161). Consecutive duplicate entries will also be skipped for convenience. - The string representation of commands shown when displaying keybindings is simplified (e.g.
cd ~instead ofcd -- [~]) (#2165). yes-no-promptsnow use the same design everywhere (#2212).- Logs generated by
-log <path>now get appended to<path>instead of overwriting it (#2215). - The
showbindsmenu now hides the redundantmodecolumn (#2226) (#2228) and omits already typed keys (#2249). - The
setlocalcommand no longer requires absolute paths (#2253). - The string representation of file permissions now matches the traditional
Unixformat instead of the one used byGo(#2270).
Added
- A new command
cmd-menu-discardis added to allow exiting the completion menu with completions discarded (#2146). - The
lf_modeenvironment variable will now be set tocompmenuif the completion menu is active (#2146). - A
rulerconfig file is added as an alternate method for customizing the ruler (#2186). This is intended to eventually replace the existingrulerfmt/statfmtoptions and must be enabled using the newrulerfileoption. This feature is currently experimental. - A new option
preloadis added to enable calling thepreviewerto generate previews in advance (#2206). This feature is currently experimental. OSC 8escape codes to render clickable hyperlinks are now supported (#2243).
Fixed
shell-pipecommands no longer wait for output if kept open after the command has finished running (#2155).- Natural sorting now compares string lengths when dealing with equivalent numbers (e.g.
0is ordered before00) (#2177). - A bug where the copy progress indicator only displayed the first time a file was copied is now fixed (#2181).
- A bug where the
sourcecommand does not show an error message upon failure is now fixed (#2189). - The
addcustominfo(#2198) andsetlocal(#2254) (#2259) commands, as well as thecleanerandprevieweroptions (#2211) now support filename completions. - A bug where an empty
custominfo property would still take up space is now fixed (#2208). - A bug where setting
drawboxcould lead to scrolling outside the view is now fixed (#2210) (#2218). - The preview cache is now not cleared when setting
ratiosto its current value (#2218). - Filtering is fixed when using special characters in the search pattern if the
filtermethodistext(#2231). - Custom commands that output messages (e.g.
cmd greet echo 'hello world') now display properly (#2245). - Errors in config files are now displayed properly (#2246).
- r382025-09-19 · 2025-09-19 04:23 UTC
查看更新说明
Changed
- The deprecated
globfilterandglobsearchoptions are now removed (#2108). - Sixel image support is now enabled by default, and the
sixeloption has been removed as it is no longer required (#2109). - The
dircacheoption has now been removed (#2110). This was previously used as a workaround to disable the directory cache since at the time changes to files were not detected reliably, but this is no longer the case. - The experimental
localeoption has been removed in favor of the recommendation to useaddcustominfo/set sortby customfor custom sorting (#2111). - The existing
doccommand has been renamed tohelpso that it is more natural for users (#2125). - Text previews are no longer displayed with a padding of two spaces by default (#2131). Instead, a custom padding can be added in the
previewerscript, for example by piping tosed 's/^/ /'.
Added
- Sixel image previews can now display multiple images as well as text (#2109).
- A new option
sizeunitsis added to allow displaying file sizes in either binary or decimal units (#2118). XDG_CONFIG_HOMEandXDG_DATA_HOMEare now taken into account when looking up config/data files on Windows (#2119).- Three new options
menufmt,menuheaderfmt, andmenuselectfmtare added to customize the appearance of the menu (#2123).
Fixed
- Error messages are now cleared after running interactive commands such as
invert/unselect/tag-toggle(#2117). - The menu is now drawn over sixel images instead of being hidden behind it if they overlap (#2122).
- A bug which prevents the user from quitting when copying files with a size of 0 has been fixed (#2130).
lf -remoteshould no longer busy wait and cause high CPU usage if its output is not being read (#2138).- The parameter types for command line options shown by
lf -helpnow match the synopsis in the documentation (#2153).
- The deprecated
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
LF
Doc | Wiki | #lf:matrix.org (with IRC bridge)
lf (as in "list files") is a terminal file manager written in Go with a heavy inspiration from ranger file manager.
See faq for more information and tutorial for a gentle introduction with screencasts.
Features
- Cross-platform (Linux, macOS, BSDs, Windows)
- Single binary without any runtime dependencies
- Fast startup and low memory footprint due to native code and static binaries
- Asynchronous IO operations to avoid UI locking
- Server/client architecture and remote commands to manage multiple instances
- Extendable and configurable with shell commands
- Customizable keybindings (vi and readline defaults)
- A reasonable set of other features (see the documentation)
Non-Features
- Tabs or windows (better handled by window manager or terminal multiplexer)
- Builtin pager/editor (better handled by your pager/editor of choice)
- Builtin commands for file operations (better handled by the underlying shell tools including but not limited to
mkdir,touch,chmod,chown,chgrp, andln)
Installation
See packages for community maintained packages.
See releases for pre-built binaries.
Building from the source requires Go.
On Unix:
env CGO_ENABLED=0 go install -trimpath -ldflags="-s -w" github.com/gokcehan/lf@latest
On Windows cmd:
set CGO_ENABLED=0
go install -trimpath -ldflags="-s -w" github.com/gokcehan/lf@latest
On Windows PowerShell:
$env:CGO_ENABLED = '0'
go install -trimpath -ldflags="-s -w" github.com/gokcehan/lf@latest
Usage
After the installation lf command should start the application in the current directory.
Run lf -help to see command line options.
Run lf -doc to see the documentation.
See etc directory to integrate lf to your shell and/or editor.
Example configuration files along with example colors and icons files can also be found in this directory.
See integrations to integrate lf to other tools.
See tips for more examples.
Contributing
See contributing for guidelines.