Introduction - leo-arch/clifm Wiki


Table of contents

What is CliFM?

Command line interface (CLI) Text-based user interface (TUI)

CliFM is, as its very name suggests, a Command Line Interface File Manager for the Unix terminal.

Though there is no general agreement regarding the distinction between CLI and TUI interfaces,1 we can stick to the following brief explanation in order to understand what CliFM is.

The difference between these two kinds of interfaces relies basically on the way the user interacts with the program, and ultimately, with the resources the program is able to handle (in our case, the files system):

Now, whenever we think of terminal file managers (FM's), we just do not think of a command line interface, but rather of a TUI; and the reason is quite simple: because in fact, almost all, if not all, terminal FM's happen to be TUI programs.2 But this does not imply at all that these notions are actually the same thing; terminal FM's are not necessarily TUI applications. And CliFM is the living proof of this: a truly command line interface file manager that, as such, never hides the command line, but works along with it extending its capabilities: bookmarks, files selection, bulk rename, directory jumper, auto-cd and auto-open, profiles, trash system, resource opener, git integration, plugins, and more.

Briefly put, CliFM feels less like a program running on top of the shell and more like this very shell put into file management mode: it is indeed a full-featured CLI file manager for the terminal.

But, why do we want a command line file manager? Kernighan and Pike stated once: "The power of a system comes more from the relationships among programs than from the programs themselves."3 In other words, the power of Unix comes not from the TUI, even less from the GUI, but from the shell, from the command line. Therefore, a file manager entirely based on the command line is no doubt an advantageous way of managing files in a Unix environment.

This is our motto indeed: Stick to the CLI!

As a plus, and insofar as it is written in entirely C with performance in mind, CliFM is really fast and lightweight.

CliFM works flawlessly on Linux, FreeBSD, NetBSD, OpenBSD, and Haiku, on x86 (both 32 and 64 bits) and ARM architectures.

1 Take a look at the resources page

2 Some TUI file managers allow the user to invoke a built-in shell (or CLI) to run shell commands. However, precisely because it needs to be invoked first, the command line is here normally hidden. This is why a CLI workflow do not play well with TUI applications: the command line, if present at all, is there only indirectly, as a secondary feature. With CliFM, by contrast, the command line is always already there. In this link you will find a list of sites reviewing some of the most popular file managers for the Unix terminal.

3 The Unix Programming Environment, Prentice-Hall, 1984, p. viii. Cf. pp. 71, 100, and 170 as well. You can also take a look a this excellent article.

Is CliFM for me?

The answer is quite straightforward: it all depends on your needs. However, you might want to consider the following points:

Reasons to avoid CliFM:

Who is CliFM aimed to then?

Main design and goals

Design decisions



Binary packages for some of the major Linux distributions are available via the OpenSUSE Build System.

This is the list of currently available packages per distribution:


For Archlinux users, the last released (stable) version is available on the AUR.

FreeBSD users can find the package on the FreeBSD Freesh Ports Collection.

Compiling and Installing CliFM

If you prefer to build and install the package yourself (it should take less than a minute), or if you want to try the latest version, or if there is no binary package available for your distribution, follow these steps.

1. Satisfy dependencies

Package(s) Operating system Install reason Description
git, make, gcc / clang / tcc Compilation
coreutils Base Basic file operation commands
libcap, acl, readline, file Archlinux-based Base
libcap-dev, libacl1-dev, libreadline-dev, libmagic-dev Debian/Ubuntu-based Base
libcap-devel, libacl-devel, readline-devel, file-devel Fedora / RHEL / CentOS Base
libcap-devel, acl-devel, readline-devel, file-devel OpenSUSE Base
devel/gettext-runtime, devel/readline, file FreeBSD Base
gettext, readline, file NetBSD Base
gettext-runtime, readline, libmagic OpenBSD Base
gettext, readline7, readline7_devel, file_devel Haiku Base
atool, archivemount, p7zip, cdrtools / cdrkit Optional Archiving and compression support
icons-in-terminal Optional Icons support

For a list of dependencies for plugins, see the plugins section.

2. Compile and install

a. Arch Linux

You'll find the corresponding packages on the AUR: the stable and the development version.

Of course, you can also clone, build, and install the package using the PKGBUILD file:

git clone
cd clifm/misc
makepkg -si

b. Other Linux distributions, FreeBSD, NetBSD, and OpenBSD

Clone the repository, cd to clifm directory, and run make:

git clone
cd clifm
sudo make install

To uninstall the package just run

sudo make uninstall

NOTE: If using OpenBSD, you probably need to replace sudo by doas.

c. Haiku

Clone the repository, cd to clifm directory, and run make:

git clone
cd clifm
make -f misc/haiku/Makefile install

To uninstall the package just run

make -f misc/haiku/Makefile uninstall

To compile features in/out consult the compilation page.

Note: If you are a real DIY and prefer to skip the Makefile automation using some compiler like gcc or clang, take a look at the compilation page.

Getting help

There are several ways of getting help in CliFM.

Command / Keybinding Action
? / help Print a minimal list of options, commands, and keybindings
F1 Access the manpage (the full description/help is here)
F2 Jump to the COMMANDS section of the manpage
F3 Jump to the KEYBOARD SHORTCUTS section

A convenient way of getting full information about CliFM commands is via the ih action, bound by default to the interactive help plugin (

Just type ih to run the plugin (it depends on FZF) and select the command you want to obtain information about.



Though this is the defualt interface, it could be heavily customized. Consult the customization page.

Command line options

Positional parameters

If the first non-option parameter is a directory, CliFM will start in this directory. Otherwise, if not a directory, it will open the file via the default associated application and exit (working thus as a stand-alone resource opener).

For example, by running clifm /etc/hosts, the hosts file will be opened and CliFM will immediately exit.

On the other side, the command clifm /etc instructs CliFM to start in the directory /etc.

If not specified, the first workspace will be used. To start in a different workspace, use the -w option. For instance: clifm -w4 /etc.

Short Long Description
-a --no-hidden Do not show hidden files (default)
-A --show-hidden Show hidden files
-b --bookmarks-file=FILE Specify an alternative bookmarks file
-c --config-file=FILE Specify an alternative configuration file
-D --config-dir=DIR Use DIR/clifm as an alternative configuration directory. Everything will be created anew in DIR
-e --no-eln Do not print ELN at the left of each file name
-f --no-folders-first Do not list folders first
-F --folders-first List folders first (default)
-g --pager Enable Mas, the files list pager
-G --no-pager Disable the pager (default)
-h --help Print a help summary and exit. For the complete help consult the manpage
-i --no-case-sensitive No case-sensitive files listing (default)
-I --case-sensitive Case-sensitive files listing
-k --keybindings-file=FILE Specify an alternative keybindings file
-l --no-long-view Disable long/detailed view mode (default)
-L --long-view Enable long/detailed view mode
-m --dirhist-map Enable the directory history map
-o --no-list-on-the-fly cd works as the shell cd(1) command
-O --list-on-the-fly cd lists files automatically (default)
-p --path=DIR Use DIR as CliFM starting path. This option is deprecated: use positional parameters instead. For example: clifm /some/dir
-P --profile=PROFILE Use (or create) PROFILE as profile
-s --splash Enable the splash screen
-S --stealth-mode Leave no trace on the host system. Nothing is read from any file nor any file is created: all settings are set to the default value. However, most settings can be controlled via command line options
-u --no-unicode Disable unicode
-U --unicode Enable unicode to correctly list file names containing accents, tildes, umlauts, non-latin letters, etc. This option is enabled by default
-v --version Show version details and exit
-w --workspace=NUM Start in workspace NUM
-x --no-ext-cmds Disallow the use of external, shell commands
-y --light-mode Enable the light mode
-z --sort=METHOD Sort files by METHOD
--case-sens-dirjump Do not ignore case when consulting the jump database
--case-sens-path-comp Do not ignore case when completing file names
--cd-on-quit Write last visited path to $XDG_CONFIG_HOME/clifm/.last to be accessed later by a shell function
--color-scheme=NAME Use color scheme NAME
--control-d-exits Use Ctrl-d (besides the default F12) to exit CliFM
--cwd-in-title Print the current directory in terminal window title
--disk-usage Show disk usage (free/total) for the filesystem the current directory belongs to
--enable-logs Enable program logs
--expand-bookmarks Expand bookmark names into the corresponding bookmark paths. TAB completion and auto-suggestions for bookmark names are also available
--fzftab Enable FZF mode for TAB completion
--highlight Enable syntax highlighting
--icons Enable icons
--icons-use-file-color Icons color follow the corresponding file color
--list-and-quit List files and quit. Example: clifm --list-and-quit /media
--max-dirhist Maximum number of visited directories to remember
--max-files=NUM List only up to NUM files
--max-path=NUM Set the maximum number of characters after which the current directory in the prompt line will be abbreviated to the directory base name (if \z is used in the prompt)
--no-dir-jumper Disable the directory jumper function
--no-cd-auto By default, CliFM changes to directories by just specifying the corresponding ELN (e.g. 12 instead of cd 12). This option forces the use of cd
--no-classify Do not append file type indicators1
--no-clear-screen Do not clear the screen before listing directories
--no-colors Disable file type colors for files listing1
--no-columns Disable columned files listing
--no-eln Do not print ELN's
--no-file-cap Do not check for files capabilities when listing files
--no-file-cap Do not check files extension when listing files
--no-files-counter Disable the files counter for directories. This option is especially useful to speed up the listing process; counting files in directories is expensive
--no-follow-symlink Do not follow symlinks when listing files
--no-open-auto Same as no-cd-auto, but for files
--no-suggestions Disable the autosuggestions system
--no-tips Disable startup tips
--no-restore-last-path By default, CliFM saves the last visited directory to be restored in the next session. Use this option to disable this feature
--no-welcome-message Disable the welcome message
--only-dirs List only directories and symbolic links to directories
--open=FILE Run as a stand-alone resource opener: open FILE and exit. This option is deprecated: use positional parameters instead. Ex: clifm /some/file
--opener=APPLICATION Resource opener to use instead of Lira, CliFM's built-in opener
--print-sel Always print the list of selected files after the current list of files. Since this list could be quite extensive, set a limit to it via the MaxPrintSelfiles option in the configuration file. Defaults to 0 (never take more than half terminal height). Use -1 to remove the limit, or any other positive value
--rl-vi-mode Set readline to vi editing mode (defaults to emacs editing mode)
--share-selbox Make the Selection Box common to different profiles
--sort-reverse Sort in reverse order, for example: z-a instead of a-z (being this latter the default order)
--trash-as-rm The r command executes trash instead of rm to prevent accidental deletions
--warn-wrong-cmds Enable the warning prompt to highlight invalid command names

1 When colors are disabled, the following file type indicators (if classify is enabled, which is the default) are used:

Indicator File type
/ Directory
@ Symbolic link
* Executable file
= Socket
| FIFO/pipe
? Unknown

Commands: Short summary

For more information about each of these commands click on the link provided by the Full description column. You could also take a look at these few basic usage examples.

NOTE: TAB completion and auto-suggestions are available for long commands.

NOTE 2: Arguments enclosed in square brackets ([]) are optional.

NOTE 3: When running commands via sudo (or doas) no CliFM (internal) command will work, for the simple reason that sudo (or doas) doesn't know anything about these commands: they only know about commands in PATH. However, you can always run CliFM as root (e.g. sudo clifm) or run a new instance of the program via the X command (note the uppercase).

Short format Long format Options Short description Example Full description
FILE/DIR Open FILE or change to DIR. Auto-open (ao) and autocd (acd) must be set to on (default) /media or 12 (provided 12 is a valid ELN) Here
/ PATTERN [-filetype] [-x] [DIR] Search for files /*.png Here
;, : [CMD] Run CMD via the system shell. If no CMD, just spawn a new system shell ;chmod 644 45 (change permissions of the file whose ELN is 45) Here
ac, ad ELN/FILE ... n Archive/compress (ac) or dearchive/decompress (ad) files ac sel (archive/compress selected files - Ctrl-Alt-a) or ad myfile.tar.gz (decompress/dearchive this file) Here
acd autocd [on, off, status] Toggle autocd on/off acd off Here
actions [edit] List actions or edit the actions file actions edit Here
alias [import FILE] List aliases or import them from FILE alias import ~/.bashrc Here
ao auto-open [on, off, status] Toggle auto-open on/off ao off Here
b back [h, hist] [clear] [!ELN] Go back to the previously visited directory b - Shift-Left or Alt-j Here
bl ELN/FILE ... n Create symbolic links (in the current directory) for each specified file bl file file2 dir/ 23 Here
bm bookmarks [a, add PATH] [d, del] [edit] [SHORTCUT, NAME] Manage bookmarks bm mybookmark - Alt-b Here
br bulk ELN/FILE ... n Bulk rename files br sel Here
c, l, m, md, r Copy, create a symlink, move/rename, and delete files respectively m 34 2 (move the file whose ELN is 34 to the directory whose ELN is 2) Here
cc colors Print the list of currently used color codes cc Here
cd [ELN/DIR] Change directory to ELN/DIR cd 2 or cd mydir Here
cl columns [on, off] Toggle columns on/off cl off Here
cmd commands Jump to the COMMANDS section in the manpage cmd Here
cs colorschemes [edit] [NAME] List, set or edit color schemes cs green-256 (change to color scheme named green-256) Here
d dup SOURCE [DEST] Duplicate file d file1 file1.bk Here
ds desel [*, a, all] Deselect one or more selected files ds * - Alt-d Here
edit [reset] [APPLICATION] Edit or generate a new configuration file edit - F10 Here
exp export [FILE ...] Export FILE(s) to a temporary file exp sel - Ctrl-Alt-e Here
ext [on, off, status] Toggle external commands on/off ext off Here
f forth [h, hist] [clear] [!ELN] Move forward in the directory history list f - Shift-Right or Alt-k Here
fc filescounter [on, off, status] Toggle the files counter on/off fc off - Alt-g Here
ff folders-first [on, off, status] Toggle list folders first on/off ff on - Alt-g Here
fs Print an extract from 'What is Free Software?', written by Richard Stallman fs Here
ft filter [unset] [REGEX] Unset or set files filter to REGEX ft .*\. (list only hidden files) or ft !.*\. (list only NON hidden files) Here
hf hidden [on, off, status] Toggle hidden files on/off hf off - Alt-. Here
history [edit] [clear] [-n] List, edit or clear the commands history list history -10 (list last 10 entries) Here
icons [on, off] Toggle icons on/off Here
j, jc, jl, jp, jo, je Jump function j ho sr (jump to a directory in the jump database matching ho and sr) Here
kb keybinds [edit] [reset] [readline] Handle keybindings kb edit - F9 Here
lm [on, off] Toggle the light mode on/off lm on - Alt-y Here
log [clear] [on, off, status] Enable, disable, list or clear command logs log Here
mf NUM List only up to NUM files (-1 to unset) mf 20 Here
mm mime [info ELN/FILENAME] [edit] [import] Handle default applications mm info 12, mm edit - F6 Here
mp mountpoints List available mountpoints and change the current working directory to the selected mountpoint mp - Alt-m Here
msg messages [clear] List or clear program messages msg clear - Alt-t Here
n new [FILE DIR/] Create new files and/or directories n file or n dir/ - Alt-n Here
net [NAME] [edit] [m, mount NAME] [u, unmount NAME] Manage remote file systems net mount smb_work Here
opener [default] [APPLICATION] Set opener to APPLICATION (or Lira if set to default) opener xdg-open Here
p, pr prop FILE ... n Print file properties for FILE p34 or p34-36 40 Here
path, cwd Print the current working directory. cwd Here
pf prof, profile [ls, list] [set, add, del PROFILE] Handle profiles pf set myprofile - Ctrl-Alt-[o/p] Here
pg pager [on, off, status] Toggle Mas, the built-in pager, on/off pg on Here
pin [FILE/DIR] Pin a file or directory pin DIR Here
q, Q, quit, exit Gracefully quit CliFM. Use Q to enable the CD on quit functionality q - F12 Here
rf refresh Refresh the screen, that is, reprint files in the current directory and update the prompt. If the autocd function is enabled, rf is equivalent to . rf - Ctrl-r Here
rl reload Reload all settings, except those passed as command line arguments, from the configuration file rl Here
s sel ELN/FILE ... n [[!]PATTERN] [-filetype] [:PATH] Select files s *.png Here
sb selbox Show the elements currently contained in the Selection Box sb - Alt-s Here
splash Show the splash screen splash Here
st sort [METHOD] [rev] Set sort method to METHOD st size - Alt-[x/z] Here
t, tr trash [ELN/FILE ... n] [ls, list] [clear] [del, rm] Trash files t34 Here
te FILE(s) Toggle executable bit on FILE(s) te45 Here
tips Print the list of CliFM tips tips Here
u undel, untrash [*, a, all] Restore (undelete/untrash) trashed files u * - Alt-u Here
uc unicode [on, off, status] Toggle unicode on/off uc off Here
unpin Unpin pinned directory unpin Here
v, vv paste sel [DESTINY] Copy or paste (selected) files into DESTINY (current directory if DESTINY is omitted) v sel - Ctrl-Atl-v Here
ver version Show CliFM version details ver Here
ws [NUM, +, -] Switch workspaces ws3 - Alt-n, where n is the workspace number Here
x, X [DIR] Open DIR, or the current directory if DIR is not specified, in a new instance of CliFM (as root if X, as unprivileged user if x) x - Ctrl-x Here

Commands: Detailed description

Preliminary notes:


ELN stands for Entry List Number. For example: in the line 12 openbox (when listing files), 12 is the ELN corresponding to the file named openbox. The slash followed by a number (/xx) after directories and symbolic links to directories (the files counter) indicates the amount of files contained by the corresponding directory, excluding self and parent directories (. and .. respectively).

ELN-filename conflict

In case of ELN-filename conflict the backslash can be used to prevent ELN expansion. For example, if we have at least two files, and one of them in named 2, then CliFM cannot know in advance if the command refers to the ELN 2 or to the file named 2. In we want the ELN, we just write the ELN number, for example: s2. But if we want the file name, we need to escape the file name using the backlash character: s \2.

Fused parameters

CliFM supports fused parameters for internal commands taking an ELN or range of ELN's as parameters. Much like short options for command line programs, you can drop or omit the space between internal commands and the corresponding ELN passed as argument. In general, you can write CMDELN instead of CMD ELN. For example: o12 or s1-5 instead of o 12 and s 1-5 respectively. Bear in mind, however, that in thus omitting the space char TAB completion and auto-suggestions for ELN's won't be available. If there is a file named o12 (more generally, CMDELN), and if you want to refer to this file instead of a CliFM command, escape the file name to prevent the split; for example: s \o12.

Fastback function

CliFM implements a fastback function, that is to say, the conversion of ... n or cmd ... n into ../.. n or cmd ../.. n. In other words, subsequent dots after .. will be converted each into /... For example, if you are in your home directory and type ... or cd ..., and since ... amounts to ../.., you will be taken to the root directory. TAB completion is available for the fastback function: ....bin -> TAB -> ../../../bin.

Commands history

Just like most shells out there, CliFM keeps a record, not only of visited directories, but also of entered commands. Use the Up and Down keys to move backwards and forwards through this list. However, not everything is recorded: there is no need to fullfil this list with useless commands. This is the list of excluded entries:

  1. Commands starting with space: usefull when you want to explictly avoid recording your command
  2. A few fixed commands: rf, history, and .
  3. Single ELN's such as 9, 74 or 75
  4. History expansion commands (!)
  5. Consequtively equal commands

List of commands


If the autocd and auto-open functions are enabled, which is the default, open FILE or change directory to DIR. In other words, FILE amounts to open FILE or o FILE, and DIR to cd DIR. ELN's, of course, are allowed. Example: 12. See the open and cd commands respectively.

/PATTERN [-filetype] [-x] [DIR]

This is the quick search function. Just type / followed by a glob or regular (or extended regular) expression, and CliFM will list all matches in the current working directory. For example, both /*.pdf and /.pdf$ expressions will list all PDF files in the current working directory, the former using wildcards, and the second a regular expression.

Bear in mind that search patterns are evaluated first as glob expressions, and then, if no matches are found, as regular expressions.

Expressions containing no pattern metacharacter are automatically replaced by /*EXP*. For example /test becomes /*test*.

To search for files in any directory other than the current one, specify the directory name as a further argument. This argument (DIR) could be an absolute path, a relative path, or an ELN. For example, enter /^A 7 to search for all files starting with 'A' in the directory whose ELN is 7.

The result of the search could be further filtered by specifying a filter type:

Filter Target
-d Directory
-r Regular file
-l Symbolic link
-s Socket
-f FIFO/pipe
-b Block device
-c Character device

For example,

/[.-].*d$ -d Documents/

will list all directories containing a dot or a dash and ending with 'd' in the directory named "Documents".

The quick search function also supports invert search: prepend the exclamation mark (!) to negate a given search pattern. For example:

!.*s$ -d /etc

will match all directories in /etc NOT ending with s, just as !D* will match all files in the current directory NOT starting with D.

To perform a recursive search use the -x parameter, and, optionally, a search path (DIR). The search will be performed using find(1) as follows: find DIR -name PATTERN. If no search path is provided, the search is executed starting in the current directory. Otherwise, the search starts in DIR.

;[CMD], :[CMD]

If no CMD, but just ; or :, run the default shell (see below the shell command) in the current working directory. If CMD is specified, skip all CliFM expansions and run the input string (CMD) as is via the default system shell. For example, ;ls 2 will not expand 2 to the filename whose ELN is 2, but will pass the entire string to the system shell, say Bash as follows: sh -c 'ls 2'.

ac, ad ELN/FILE ... n

Archive/compress and dearchive/decompress one or multiple files and/or directories. The archiver function brings two modes: ac, to generate archives or compressed files, and ad, to decompress or dearchive files, either just listing, extracting, recompressing, or mounting their content. In this latter case, the mountpoint used automatically is $HOME/.config/clifm/PROFILE/mounts/ARCHIVE_NAME.

The function accepts single and multiple file names, wildcards, ELN ranges, and the sel keyword. For example: ac sel, ac 4-25 myfile, or ad *.tar.gz. Multiple archive/compression formats are supported, including Zstandard. When it comes to ISO 9660 files only single files are supported.

The archive mount function for non ISO files depends on archivemount, while the remaining functions depend on atool and other third-party utilities for archive formats support, for example, p7zip. p7zip is also used to manage most decompressing options for ISO 9660 files, except for mount, in which case mount(8) is used. Creation of ISO files is done via genisoimage(1). For more information consult atool(1), archivemount(1), zstd(1), and 7z(1).

acd, autocd [on, off, status]

Toggle the autocd function on/off. If set to on, DIR amounts to cd DIR.

actions [edit]

With no argument, lists available custom actions (AKA, plugins). Use the 'edit' option to add, remove or modify custom actions. The aim of this function is to allow the user to easily add custom commands and functions to CliFM. In other words, the actions function is a plugins capability.

The general procedure is quite simple:

a) Bind a custom action name to an executable file written in any language you want, be it a shell or a Python script, a C program or whatever you like (using the actions.cfm file located in the configuration directory). For example:

b) Now, drop the corresponding script (in our example, into the plugins directory (see the files section).

c) Once this is done, you can call the script using the custom action name defined before as if it were any other command: run myaction, and will be executed.

All arguments passed to the action command are passed to the script or program as well (which is run via the system shell).

The plugins provided with CliFM could be used as a starting point to create custom plugins.

alias [import FILE]

With no argument, it prints the list of available aliases, if any. To write a new alias simply enter edit (or press F10) to open the configuration file and add a line like this one: alias name='command args...' or alias name='directory'.

To import aliases from a file, provided it contains aliases in the specified form, use the import option. Aliases conflicting with some of the internal commands won't be imported.

However, a neat usage for the alias function is not so much to bind short keys to commands, but to files and directories visited regularly. In this way, it is possible to bind as many files or directories, no matter how deep they are in the filesystem, to very short strings, even single characters. For example, alias w='/some/file/deep/in/the/filesystem'. Now, no matter where we are, we can just enter w, provided autocd and/or auto-open function are enabled, to access the file or directory we want. Theoretically at least, this procedure could be repeated until the system memory is exhausted.

To create multiple aliases for files at once, this is the recommended procedure:

  1. Select all files you want to alias with the sel function: s file1 file2 file3 .... \
  2. Export the selected files into a temporary file running exp sel; \
  3. Edit this file to contain only valid alias lines:
alias a1='file1'
alias b1='file2'
alias c1='file3'

NOTE: Make sure alias names do not conflict with other commands, either internal or external. To bypass the conflicts check, performed automatically by the alias import command, you can just edit the aliases file manually.

  1. Finally, import this file with the alias function: alias import tmp_file. Now, you can access any of these files by entering just a few characters: a1, b1, and c1.

ao, auto-open [on, off, status]

Toggle the auto-open function on/off. If set to on, FILE amounts to open FILE.

b, back [h, hist] [clear] [!ELN]

Unlike cd .., which sends you to the parent directory of the current directory, the back command (with no argument) sends you back to the previously visited directory.

CliFM keeps a record of all visited directories. You can see this list by typing b hist, b h or bh, and you can access any element in this list by simply passing the corresponding ELN in this list (preceded by an exclamation mark) to the back command. Example:

:) > ~ $ bh
1 /home/user
2 /etc
3 /proc
:) > ~ $ b !3
:) > /proc $

NOTE: The highlighted line indicates the current position of the back function in the directory history list.

Finally, you can also clear this history list by typing b clear.

Automatic maintainance is performed on this list: invalid directories are skipped and removed.

If you want to go forth, instead of backwards, in the directory history list, just use the forth command.

The best way of navigating the directory history list, however, is via the directory jumper function using the j command.

bl ELN/FILE ... n

Create symbolic links (in the current directory) for each specified file. The user will be asked to enter a specific suffix for the symlinks. If none is specified, the basename of the corresponding file is used.

bm, bookmarks [a, add PATH] [d, del] [edit] [SHORTCUT, NAME]

With no argument, open the bookmarks menu. Here you can cd into the desired bookmark by entering either its ELN, its shortcut or its name. In this screen you can also add, remove or edit your bookmarks by simply typing 'e' to edit the bookmarks file, which is simply a list of lines with this format:




If you want to add or remove a bookmark directly from the command line, use the 'a' and 'd' arguments respectively. Example: bm a /media/misc or bm d. You can also open a bookmark by typing bm SHORTCUT or bm NAME (in which latter case TAB completion and auto-suggestions are available).

A handy use for the bookmarks function, provided the expand-bookmarks option is enabled, is to create bookmarks using short names, which will be later easily accessible via TAB completion (and auto-suggestions).

br, bulk ELN/FILE ... n

Rename at once all files passed as arguments to the function. It accepts single and multiple file names, wildcards, ELN ranges, and the sel keyword. For example:

br myfile 4-10 sel

Each file name will be copied into a temporary file, which will be opened with the default text editor (via the mime function), letting the user modify it. Once the file has been modified and saved, the modifications are printed on the screen and the user is asked whether to proceed with the actual bulk renaming or not.

This built-in bulk rename function won't deal with deletions, replacements, file name conflicts and the like. For a smarter alternative use qmv(1).

c, l [e, edit], m, md, r

c, l, m, md, and r commands are wrappers for cp(1), ln(1), mv(1), mkdir(1), and rm(1) shell commands respectively. The exact shell commands run by each of these internal commands are the following:

Internal command Shell command
c cp -iRp1
l ln -sn
m mv -i
md mkdir -p
r rm -I (for files), and rm -dIr (for directories)2 3

1 See also the paste command
2 On POSIX compliant systems, like NetBSD, the r command amounts to rm -r for directories and rm -f for files, since the -I option is not available and -i is too intrusive.
3 If the TrashAsRm option is set to true in the configuration file (or the --trash-as-rm option was specified in the command line), r amounts to t to prevent accidental deletions. See the trash command.

To use these commands without any of these arguments, or with any other argument you need, just use the corresponding shell command, for instance, cp instead of c.

CliFM supports advcp and wcp to copy files (to add a progress bar to cp). To use them instead of cp set the corresponding option (cpCmd) in the configuration file. If advcp is selected, the command used is advcp -giRp. wcp takes no argument.

advmv is also supported to move files (to add a progress bar to mv). Use the mvCmd option in the configuration file to choose this alternative implementation of mv. In this case, the command used is advmv -gi.

The l command allows the use of the e, edit option to modify the destination of a symbolic link. For example:

l e 12


le 12

to relink the symbolic link corresponding to the ELN 12.

cc, colors

Print the color codes list currently used for files listing.

cd [ELN/DIR]

Change the current working directory to ELN/DIR.

Directories check order:

  1. If no argument, change to the home directory (HOME, or, if HOME is not set, the sixth field of the entry corresponding to the current user in /etc/passwd)
  2. If argument is an absolute path (begins with a slash character), or the first component is dot (.) or dot-dot (..), convert to canonical form (via realpath(3)) and, if a valid directory, change into it.
  3. Check CDPATH environment variable and append /DIR to each of the paths specified here. If the result of the concatenation is a valid directory, change into it.
  4. Check directories in the current working directory. If a matching directory is found, change to it.

You can use either ELN's or a string to indicate the directory you want. Ex: cd 12 or cd ~/media. If autocd is enabled (default), cd 12 and cd ~/media could be written as 12 and ~/media respectively as well.

Unlike the shell cd(1) command, CliFM's built-in cd function not only changes the current directory, but also lists its content (provided the option \fICdListsAutomatically\fR is enabled, which is the default) according to a comprehensive list of color codes. By default, the output of \fIcd\fR is much like this shell command: cd DIR && ls \-\-color=auto \-\-group\-directories\-first.

Automatic files listing can be disabled either setting CdListsAutomatically to "false" in the configuration file or running CliFM with the -o or --no-list-on-the-fly option.

cl, columns [on, off]

Toggle columns on/off.

cmd, commands

Show this list of commands. A more convenient way of getting information about CliFM commands is via the interactive help plugin (depends on FZF), by default bound to the ihelp action name.

cs, colorschemes [edit] [NAME]

With no arguments, list available color schemes. Use the edit option to open the configuration file of the current color scheme. Otherwise, just switch to the color scheme NAME. TAB completion is available for this function.

d, dup SOURCE [DEST]

Create a duplicate of SOURCE named DEST, where SOURCE could be either a directory or a file. If DEST is omitted, ".copy" will be appended to the basename of SOURCE and used as destination file. For example: d /my/file will duplicate /my/file in the current directory as file.copy. If file.copy already exists, a suffix with the current date and time will be added: file.copy.YYYYMMDDHHMMSS.

If rsync(1) is found, it will be used as follows: rsync -aczvAXHS --progress. Else, cp(1) will be used: cp -a.

ds, desel [*, a, all]

Deselect one or more selected files. The user is prompted to either mark entries to be deselected or to edit the selections file via a text editor to manually deselect files.

You can also deselect all selected files at once by passing *, a or all to the function. Ex: ds *.

edit [reset] [APPLICATION]

Edit the main configuration file (F10 key is also available). If an application is specified, it will be used to open the configuration file. Use the 'reset' option to generate a fresh configuration file and create a backup copy of the old one (named [email protected]:MM:SS).

exp, export [FILE ...]

With no argument, export the list of files in the current working directory to a temporary file. Otherwise, export only those specified as further arguments: they could be directories, file names, ELN's or some search expression like "*.c".

ext [on, off, status]

Toggle external commands on/off.

f, forth [h, hist] [clear] [!ELN]

The forth command works just like the back function, but it goes forward in the history record. Of course, you can use f hist, f h, fh, and f !ELN.

fc, filescounter [on, off, status]

By default, CliFM prints the amount of files contained by listed directories next to directories name. However, since this is an expensive feature, It might be desirable, for example, when listing files in a remote machine, to disable this feature. Use the off option to disable it. To permanently disable it, use the FilesCounter option in the configuration file.

ff, folders-first [on, off, status]

Toggle list folders first on/off.


Print an extract from 'What is Free Software?', written by Richard Stallman.

ft, filter [unset] [REGEX]

With no argument, print the current filter. To remove the current filter use the unset option. To set a new filter enter ft REGEX, for example:

ft ^.

to prevent hidden files from being listed, or

ft .*~$

to exclude backup or temporary files.

The filter will be lost at program exit. To permanently set a files filter use the Filter option (in the configuration file). You can also use the CLIFM_FILTER environment variable (see below), though the value of this variable will be lost at system shutdown or reboot.

hf, hidden [on, off, status]

Toggle hidden files on/off.

history [edit] [clear] [-n]

With no arguments, it shows the history list. If clear is passed as argument, it will delete all entries in the history file. Use edit to open the history file and modify it if needed. Finally, -n tells the history command to list only the last 'n' commands in the history list.

You can use the exclamation mark (!) to perform some history commands:

Command Description
!! Execute the last command
!n Execute the command number 'n' in the history list
!-n Execute the last-n command in the history list
![STRING] Execute command starting with STRING.

TAB completion is available: just type ! and then press TAB to see the complete list of history commands, or !str and then TAB to see the list of entries matching STR.

icons [on, off]

Toggle icons on/off

j, jc, jl, jp [STR ...], jo [NUM], je

j is the fastest way of using Kangaroo, a directory jumper function to quickly navigate through the jump database (i.e. a database of visited directories).

Basic usage of the j command:

Command Example Description
j j List the entries in the jump database, printing the order number of the corresponding entry, the number of visits, the days since the first visit, the hours since the last visit, the rank value, and the directory name itself. An asterisk next to the rank value means that the corresponding directory is bookmarked, the current working directory in some workspace or pinned
j STR j d Search for STR in the database and cd into the best ranked matching entry. j d will probably take you to /home/user/Downloads, provided this directory has been already visited and is the best ranked match in the database. For a more detailed description of the matching algorithm see the Kangaroo frecency algorithm section. Bear in mind that if STR is an actual directory, Kangaroo will just cd into it without performing any query
j STR STR j et mo Multiple query strings could be passed to the function. j et mo will first check for et in the jump database and then will further filter the search using the second parameter: mo. It will most probably take you (again, provided the directory has been already visited and is the best ranked match) to /etc/modprobe.d directory
j STR/ j src/ Search for an entry in the database whose last path segment contains STR. Let's suppose we have two entries matching src in the database: /media/src/images and /home/user/Downloads/clifm/src. If the first entry is better ranked than the second, j src will match this first entry. However, if what we really want is the second entry, appending a slash to the query string instructs Kangaroo to only match entries having src in the last path segment, here /home/user/Downloads/clifm/src
j STR\ j src\1 Search for an entry in the database whose first path segment contains STR

1 Both the slash and te backslash could be used together in one command. For example, j a\ b/ tell Kangaroo to search for an entry whose first path segment contains a and whose last segment contains b.

NOTE: Since it is not always obvious or easy to know where exactly a query string will take you, CliFM will print, at the right of the cursor, the path matched by Kangaroo as you type. If the suggested path is the actually intended path, just press Right or Ctrl-f to accept the suggestion. Otherwise, it will be ignored. You can also use TAB completion to print the list of matches for the current query string. For example: j - cTAB to list all entries in the directory history list containing a dash (-) and a c.

j accepts five modifiers:

Modifier Description
e Edit
p Parent
c Child
o Order
l List


je will open the jump database to be edited if needed.

jc will search for files querying only child directories relative to the current working directory.

'jp' will do the same but for parent directories.

jo allows to specify an order number (the left most value in the jump list) instead of a string or a file name, in which case no matching process is performed.

Finally, jl just prints the matches for the given query string(s), but without changing the current directory. Examples:

Command Description
jp foo cd to the most visited parent directory containing the string "foo"
jc bar test cd to the most visited child directory containing the strings "bar" and "test"
jo 13 cd into the path corresponding to the order number 13. TAB completion is available to expand order numbers into the corresponding paths
jl foo print all entries in the database matching the word "foo"

To reset or modify the jump database as you wish, simply open the jump file using the je command, edit whatever needs to be edited, save changes, and close the editor.

NOTE: An alternative way of navigating the jump database is using the jumper plugin (located in the plugins directory and bound by default to the ++ action name), which uses FZF to enable fuzzy searches. Just enter ++ to perform a fuzzy search over the jump database.

kb, keybinds [edit] [reset] [readline]

With no argument, prints the current keyboard codes and their associated functions. To edit the keybindings file, use the edit option. If you somehow messed up your keybinds, use the reset option to create a fresh keybindings file. To see a list of the readline keybindings, use the readline option. Note that these keybindings are not provided by CliFM, but by readline itself, and as such depend on the system settings (they can be customized however via the ~/.inputrc file).

lm [on, off]

Toggle the light mode on/off. This option, aimed to make files listing faster than the default mode, is especially useful for really old hardware or when working on remote machines. For more details see the light mode section.

log [clear] [on, off, status]

With no arguments, it prints the contents of the commands log file. If clear is passed as argument, all the logs will be deleted. on, off, and status enable, disable, and check the status of the log function for the current session.

If logs are enabled, they are written to the commands log file. This file contains a series of fields separated by a colon in the following way: date:user:current_dir:command.

The following commands will be logged:

  1. External commands
  2. Internal commands able to modify the file system (such as c, m, r, l, etc.)

mf NUM

List only up to NUM files. Use -1 to list all files (default). An indicator (listed_files/total_files) will be printed below the list of files whenever some file is excluded from the current list (e.g. 20/310). Note however that though some files are excluded, all of them are loaded anyway, so that you can still perform any valid operation on them. For example, even if only 10 files are listed, you can still search for ALL symbolic links in the corresponding directory using the appropriate command: /* -l.

mm, mime [info ELN/FILENAME] [edit] [import]

This is Lira, CliFM's resource opener. The info option prints the MIME information about ELN/FILENAME: its MIME type, its file extension, if any, and the application associated to this MIME type or file extension.

The edit option allows you to edit and customize the MIME list file. So, if a file has no default associated application, first get its MIME info or its file extension (running mm info FILE), and then add a value for it to the MIME list file using the edit option (mm edit or F6). See the resource opener section for information about the mimelist file syntax.

Finally, via the import option CliFM will try to import MIME defintions from the system (checking those paths specified by the Freedesktop specification). If at least one defintion is successfully imported, a backup of the current mimelist file will be stored as mimelist.cfm.YYYYMMDDHHMMSS. Otherwise, no change will be made.

mp, mountpoints

List available mountpoints and change the current working directory to the selected mountpoint.

msg, messages [clear]

With no arguments, prints the list of messages in the current session. The clear option tells CliFM to empty the messages list.

n, new [FILE, DIR/ ...n]

Create new files and/or directories. File names ending with a slash (/) will be taken as directory names and created via the shell command mkdir -p. Otherwise, they will be created using the touch shell command. Example:

n myfile mydir/

If no file name is specified, the user will be asked for one. If one or more of the specified file names already exist, .new will be appended to the file name.

net [NAME] [edit] [m, mount NAME] [u, unmount NAME]

1. The configuration file

The net command manages connections to remote file systems via a simple samba-like configuration file ($HOME/.config/clifm/profiles/PROFILE/nets.cfm). Here you can specify multiple remotes and options for each of these remotes.1 The syntax of this file is as follows:

Option Values Example Description
[NAME] [smb_work] A custom name for the remote
Comment A nice descriptive comment Comment=Work samba share Descriptive and short line describing the remote
Mountpoint /path/to/mountpoint Mounpoint=~/.config/clifm/mounts/smb_work The path where the remote will be mounted
MountCmd CMD MountCmd=sudo mount.cifs // %m -o ..._1 2_ The complete command used to mount the remote
UnmountCmd CMD UnmountCmd=sudo umount %m_2 3_ The complete command used to unmount the remote
AutoMount Boolean AutoMount=true If true, mount this remote at startup
AutoUnmount Boolean AutoUnmount=false If true, unmount this remote at exit

1 Though originally intended to manage remote file systems, net can also manage local file systems. Just provide the appropriate mount and unmount commands. That is it.
2 %m is used as a placeholder for Mountpoint. %m will be replaced by the value of Mountpoint.
3 If running CliFM as a normal, unprivileged user, you will probably need to run the mount and unmount commands as root.

2. The command syntax

Option Example Description
net Without arguments, net lists the configuration for each remote available in the configuration file
edit net edit Edit the remotes configuration file. If no further argument is specified, the file will be opened with the current resource opener. However, you can pass an application as second parameter to open the configuration file. Example net edit nano
m, mount NAME net m smb_work If not already mounted, mount the remote named smb_work using the mount command and the mounpoint specified in the confifuration file, and automatically cd into the corresponding mountpoint. m, mount could be omitted, so that net smb_work amounts to net m smb_work. TAB completion is available for this function
u, unmount NAME net u smb_work Unmount the remote named smb_work using the unmount command specified in the configuration file. TAB completion is available for this function too


Open FILE, which can be either a directory, in which case it works just like the cd command, a regular file, or a symbolic link to either of the two. For example: o 12 (or just o12), o filename, o /path/to/filename.

By default, the open function will open files with the default application associated to them via Lira, the built-in resource opener (see the mime command). However, if you want to open a file with a different application, just add the application name as second argument, e.g. o 12 leafpad.

If you want to run the program in the background, simply add the ampersand character, as usual: o 12 &, o 12&, o12&, or (if auto-open es enabled) just 12&.

If the file to be opened is an archive/compressed file, the archive function (see the ad command) will be executed instead.

opener [default] [APPLICATION]

With no argument, prints the currently used resource opener (by default, Lira, CliFM's built-in opener). Otherwise, set APPLICATION as opener or, if default is passed instead, use Lira.

p, pr, prop ELN/FILE ... n

Print file properties for ELN/FILE. The output of this function is much like the combined output of ls -l and stat shell commands. By default, directories size is not shown. Use pp instead of just p to print directories size as well (it could take longer depending on the directory's content).

path, cwd

Print the current working directory.

pf, prof, profile [ls, list] [set, add, del PROFILE]

With no arguments, prints the name of the currently used profile. Use the ls or list option to list available profiles. To switch, add or delete a profile, use the set, add, and del options respectively followed by the corresponding profile name.

Bear in mind that, when switching profiles, command line arguments will be ignored.

pg, pager [on, off, status]

Toggle Mas, the built-in pager, on/off. Useful to list directories with hundreds or thousands of files, the pager will start working, if set to on, whenever the screen is not enough to list all files.

Once in the pager, press Down, Space or Enter to move downwards one line, or PageDown to move downwards an entire page. To go upwards, use the shortcuts provided by your terminal emulator, for example, Alt-PageUp or Alt-Up. Press c, p, or q keys to stop the pager, and h or ? for help.

pin [FILE/DIR]

Pin a file or a directory to be accessed later via the comma (,) keyword. For example, run pin mydir and then access mydir as follows: cd , where the comma is automatically expanded to the pinned file, in this case mydir. The comma keyword could be used with any command, either internal or external, e.g, ls ,.

With no arguments, the pin command prints the current pinned file, if any. If an argument is given, it will be taken as a file name to be pinned. Running this command again, frees the previous pinned files and sets a new one. In other words, only one pin is supported at a time.

An easy alternative to create as many pins or shortcuts as you want, and how you want, is to use the alias function. Bookmarks could also be used to achieve a very similar result.

At program exit, the pinned file is written to a file in the configuration directory (as .pin) to be loaded in the next session.

q, quit, exit, Q

Gracefully quit CliFM. Use Q to gracefully quit and enable the CD on quit functionality (write last visited directory to $XDG_CONFIG/clifm/.last to be later read by a shell function. See the CD on quit section).

rf, refresh

Refresh the screen, that is, reprint files in the current directory and update the prompt. If the current directory is not accessible for any reason, rf will go up until it finds an accessible one, and then will change to that directory.

rl, reload

Reload all settings, except those passed as command line arguments, from the configuration file.

s, sel ELN/FILE ... n [[!]PATTERN] [-filetype] [:PATH]

Send one or multiple elements (either files or directories) to the Selection Box. sel accepts individual elements, range of elements, say 1-6, file names and paths, just as wildcards (globbing) and regular expressions. Example:

s 1 4-10 ^r file* filename /path/to/filename

To deselect selected files, use the ds command, or the Alt-d keyboard shortcut.

Just as in the search function, it is also possible to further filter the list of matches indicating the desired file type. For instance,

s ^ -d

will select all directories in the current working directory. For available file type filters see the search function above.

By default, the selection function operates on the current working directory. To select files in any other directory use the :PATH expression. For example, to select all regular files with a .conf extension in the /etc directory, the command would be:

s .*\.conf$ -r :/etc

or using wildcards:

s *.conf -r :/etc

Just as in the case of the search function, inverse matching is supported for patterns, either wildcards or regular expressions. To invert or reverse the meaning and action of a pattern, just prepend an exclamation mark (!). E.g., to select all non-hidden regular files in the Documents directory, issue this command:

s !^. -r :Documents

or, to select all directories in /etc, except those ending with ".d":

s !*.d -d :/etc

Glob and regular expressions could be used together. For example:

s ^[r|R].*d$ /etc/*.conf

will select all files starting with either 'r' or 'R' and ending with 'd' in the current working directory, plus all .conf files in the /etc directory. However, this use is discouraged if both patterns refer to the same directory, since the second one will probably override the result of the first one.

It is important to note that glob expressions are evaluated before regular expressions, in such a way that any pattern that could be understood by both kinds of pattern matching mechanisms will be evaluated first according to the former, that is, as a glob expression. For example, .*, as regular expression, should match all files. However, since glob expressions are evaluated first, it will only match hidden files. To select all files using a glob expression, try .* *, or, with a regular expression: ^ or (.*?). Alt-a is also available to perform the same operation.

The Selection Box is accessible to different instances of the program, provided they use the same profile (see the profile command). By default, indeed, each profile keeps a private Selection Box, being thus not accessible to other profiles. You can nonetheless modify this behavior via the ShareSelbox option in the configuration file. If the ShareSelbox option is enabled, selected files are stored in /tmp/clifm/username/.selbox. Otherwise, /tmp/clifm/username/.selbox_profilename is used (this is the default).

sb, selbox

Show the elements currently contained in the Selection Box.


Show the splash screen.

st, sort [METHOD] [rev]

With no argument, print the current sorting method. Else, set sorting method to METHOD, where METHOD could be:

Number Reference
0 none
1 name
2 size
3 atime
4 btime (ctime if not available)
5 ctime
6 mtime
7 version (name if not available)
8 extension
9 inode
10 owner
11 group

Both numbers and names are allowed. Bear in mind that methods 10 and 11 sort by owner and group ID number, not by owner and group names.

By default, files are sorted from less to more (ex: from 'a' to 'z' if using the "name" method). Use the rev option to invert this order. Ex: st rev or st 3 rev. Switch back to the previous ordering running st rev again.

t, tr, trash [ELN/FILE ... n] [ls, list] [clear] [del, rm]

With no argument (or by passing the ls option), it prints a list of currently trashed files. The clear option removes all files from the trash can, while the del option lists trashed files allowing you to remove one or more of them. To restore a trashed file, use the u command.

The trash directory is $XDG_DATA_HOME/Trash, usually ~/.local/share/Trash. Since this trash system follows the Freedesktop specification, it is able to handle files trashed by different Trash implementations.

For a more detailed explanation see the Trashing files section.

te FILE(s)

Toggle executable bit (on user, group, and others) on FILE(s). It is equivalent to the -x and +x options for the shell chmod(1) command.


Print the list of CliFM tips

u, undel, untrash [*, a, all]

Print a list of currently trashed files allowing you to choose one or more of these files to be undeleted, that is to say, restored to their original location. You can also undelete all trashed files at once using the *, a or all option.

uc, unicode [on, off, status]

Toggle unicode on/off.


This command takes no argument. It just frees the current pin and, if it exists, deletes the .pin file generated by the pin command.

v, vv, paste sel [DESTINY]

The paste sel or v sel command copies the currently selected files, if any, into the current working directory.

To copy these files into another directory, tell paste where to copy these files. Ex:

paste sel /path/to/directory

The copy command (c) could be used in the same way:

c sel

indeed copies selected files into the current directory.

Use the vv command instead of just v to copy selected files and rename them at once.

ver, version

Show CliFM version details.

ws [NUM, +, -]

CliFM offers up to eight workspaces, each with its own independent path.

With no argument, the ws command prints the list of workspaces and its corresponding paths, highlighting the current workspace. Use NUM to switch to workspace NUM, the plus sign (+) to switch to the next workspace, and the minus sign (-) to switch to the previous workspace. Four keyboard shortcuts are available to easily switch to any of the first four workspaces: Alt-[1-4].

Every time an empty workspace is created, it starts in the path of the workspace from which it was invoked (in other words, in the current working directory).

x, X [DIR]

Open DIR, or the current working directory if DIR is not specified, in a new instance of CliFM, as root if X (uppercase), as unprivileged user if x (lowercase). TerminalCmd (see the configuration file will be used to launch the new instance. If it is not set, xterm will be used as fallback terminal emulator.

This function is only available for graphical environments.


NOTE: Bear in mind that the following are the default keybindings, but may be freely modified by the user. Consult the keybindings customization page.

Keyboard shortcut Action Name 1
Ctrl-a Move the cursor to the beginning of the line
Ctrl-e Move the cursor to the end of the line
Ctrl-k Delete line starting form current cursor position
Alt-c Clear the current command line buffer clear-line
Up Move to the previous entry in the commands history
Down Move to the next entry in the commands history
Right, Ctrl-f 2 Accept the entire suggestion
Alt-Right, Alt-f 2 Accept the first suggested word only
Alt-n Create new file or directory create-file
Alt-g Toggle list-folders-first on/off folders-first
Alt-, Toggle list only directories on/off only-dirs
Ctrl-r Refresh the screen (reprint files in current directory and update prompt) refresh-screen
Alt-t Clear program messages clear-msgs
Alt-l Toggle long view mode on/off toggle-long
Alt-m List mountpoints mountpoints
Alt-b Launch the Bookmarks Manager bookmarks
Alt-i, Alt-. Toggle hidden files on/off toggle-hidden
Alt-h Show directory history show-dirhist
Alt-s Open the Selection Box selbox
Alt-a Select all files in the current working directory select-all
Alt-d Deselect all selected files deselect-all
Alt-p Change to pinned directory pinned-dir
Alt-1 Switch to workspace 1 workspace1
Alt-2 Switch to workspace 2 workspace2
Alt-3 Switch to workspace 3 workspace3
Alt-4 Switch to workspace 4 workspace4
Alt-r Change to root directory root-dir
Alt-e, Home Change to home directory home-dir
Alt-u, Shift-Up Change to parent directory parent-dir
Alt-j, Shift-Left Change to previous visited directory previous-dir
Alt-k, Shift-Right Change to next visited directory next-dir
Ctrl-Alt-j Change to first visited directory first-dir
Ctrl-Alt-k Change to last visited directory last-dir
Ctrl-Alt-o Switch to previous profile previous-profile
Ctrl-Alt-p Switch to next profile next-profile
Ctrl-Alt-a Archive selected files archive-sel
Ctrl-Alt-e Export selected files export-sel
Ctrl-Alt-r Rename selected files rename-sel
Ctrl-Alt-d Remove selected files remove-sel
Ctrl-Alt-t Trash selected files trash-sel
Ctrl-Alt-u Restore trashed files untrash-all
Ctrl-Alt-b Bookmark last selected file/directory bookmark-sel
Ctrl-Alt-g Open/change-to last selected file/directory open-sel
Ctrl-Alt-n Move selected files into the current directory move-sel
Ctrl-Alt-v Copy selected files into the current directory copy-sel
Alt-y Toggle light mode on/off toggle-light
Alt-z Switch to previous sorting method sort-previous
Alt-x Switch to next sorting method sort-next
Ctrl-x Launch new instance of the program new-instance
Alt-v Prepend CLIFM_SUDO_CMD (if not set, defaults to sudo or doas) to the current command line prepend-sudo
F1 Go to the manpage show-manpage
F2 List commands show-cmds
F3 List keybindings show-kbinds
F6 Open the MIME list file open-mime
F7 Open the jump database file open-jump-db
F8 Open the current color scheme file edit-color-scheme
F9 Open the keybindings file open-keybinds
F10 Open the configuration file open-config
F11 Open the bookmarks file open-bookmarks
F12 Quit quit

1 This column refers to the name of the function in the keybindings file. These names are used for keybindings customization
2 These keybindings are not customizable

Keybindings issues

Some of the above keybindings might not work on your console/terminal emulator, depending on the console/terminal, window manager and/or operating system settings. Some example cases and their workarounds:

1) Default keybindings will just not work:

2) Keybindings are not bound/recognized by the console/terminal emulator:

a) FreeBSD (sc), NetBSD (wsvt25), and OpenBSD (vt220) kernel consoles: Key sequences involving Alt won't work out of the box. Here's how to make it work:

105   lalt   lalt   lalt   lalt   lalt   lalt   lalt   lalt    0

Finally, add this line to /etc/rc.conf:


Note: For more information about this issue, consult this article from the EmacsWiki
Note 2: CliFM provides a copy of us.clifm.kbd. For other keymaps, you need to manually create the keymap file as described here.
Note 3: If you prefer not to go through all this hassle, you can just use Esc instead of Alt, for example, Esc-. instead of Alt-. to toggle hidden files on-off.

  1. Copy /etc/examples/wsconsctl.conf to /etc (if it does not already exist)
  2. Add the metaesc flag to your current keyboard enconding. For example keyboard.encoding=us.metaesc You might need to reboot the machine for changes to take effect.

b) Konsole terminal emulator: If Shift-Left and Shift-Right are not already bound to any function, you need to bind them manually. Go to Settings -> Edit current profile -> Keyboard -> Default (Xfree4), and add these values:

Left+Shift	\E[1;2D
Right+Shift	\E[1;2C

If they are already bound, by contrast, you only need to unbound them (go to Settings -> Configure keyboard shortcuts, click on the corresponding keybinding, and set it to Custom (none)).

c) Mlterm: Alt keybindings key do not work by default. To fix this, copy /etc/mlterm/main to ~/.mlterm/main and set the following settings:

mod_meta_key = alt
mod_meta_mode = esc

3) Keybindings are already used by another application:


Keybindings might not work for several reasons:

Cause Solution/workaround
The keybinding is hard-coded (or it isn't convenient to modify) in another application, either the operating system itself (Haiku case), or the terminal/console (kernel console case) Bind CliFM's corresponding function to some other key/key-sequence or use some of the provided alternative key sequences
The keybinding is not bound/recognized by the console/terminal emulator itself Bound the keybinding from the console/terminal emulator settings
The keybinding is already taken by other application (Window Manager or console/terminal emulator) Rebind the corresponding key from the application or change CliFM's keybinding for that function

Next: Advanced tricks