Quick Start
Welcome to F2 Commander! Here's what you need to know to get started:
- Tab ⭾ switches focus between the left and right panels
- j/k and ↓/↑ navigate the file list up and down
- Enter ⮐ enters the directory or opens the file with the system default program
- Backspace ⌫ (or Enter ⮐ on the
..) navigates to the parent directory - All keys shown in the footer execute the indicated actions (copy, move, etc.)
- Ctrl+P opens the Command Palette
- q/F10 quits the application
Display Control
| Action | Keybinding | Description |
|---|---|---|
| Toggle hidden files | h | Show/hide hidden files |
| Sort by name (asc) | n | Order by name A-Z |
| Sort by name (desc) | N | Order by name Z-A |
| Sort by size (asc) | s | Order by size smallest first |
| Sort by size (desc) | S | Order by size largest first |
| Sort by time (asc) | t | Order by modification time oldest first |
| Sort by time (desc) | T | Order by modification time newest first |
| Calculate dir size | Ctrl+Space | Calculate size of directory under cursor |
File Operations
Most actions for file and directory manipulation are shown in the footer menu. A few more actions are available in the Command Palette (Ctrl+P).
Key Mappings
F2 Commander supports two key mapping modes that can be changed in the configuration:
Vi-like Mnemonics (Default)
Designed for modern laptop keyboards where function keys may be used for media controls:
| c | Copy |
| m | Move |
| D | Delete (upper case) |
| r | Rename |
| e | Edit (open in editor) |
| v | View (open in viewer) |
| x | Execute shell |
Function Keys
Traditional orthodox file manager bindings:
| F5 | Copy |
| F6 | Move |
| F7 | Create directory |
| F8 | Delete |
| F3 | View |
| F4 | Edit |
| F9 | Execute shell |
The current mapping is shown in the footer menu. Change the mapping in Configuration (Ctrl+P → "Configuration").
Multiple Selection
Some actions, such as copy, move and delete, can be performed on multiple entries:
| Space or Shift+j/k/↓/↑ | Select/unselect an entry |
| - | Clear all selections |
| + | Select all displayed entries |
| * | Invert selection |
Shell Integration
Press x/F9 to start a subprocess with a new shell in the current location. The shell opens in the directory you're currently viewing.
To return to F2 Commander, quit the shell:
- type
exitand press Enter - or, press Ctrl+D
Remote File Systems (Preview)
Press Ctrl+T to open the connection dialog and connect to remote file systems.
Installing Protocol Support
To connect to a remote file system you may need to install additional packages that are indicated in the "Connect" dialog upon selecting a protocol.
For example, if you installed F2 Commander with pipx, and you want to connect to an S3 bucket, you need to install the s3fs package:
pipx inject f2-commander s3fs
Common Protocols
| Protocol | Package | Install Command |
|---|---|---|
| AWS S3 | s3fs |
pipx inject f2-commander s3fs |
| Google Cloud Storage | gcsfs |
pipx inject f2-commander gcsfs |
| Azure ADLS | adlfs |
pipx inject f2-commander adlfs |
| FTP/FTPS | (built-in) | - |
| SFTP | (built-in) | - |
The "Connect" dialog is in its "alpha" version, exposing the underlying connector configuration in a generic way. Refer to the documentation of the installed additional packages for more information.
Remote Bookmarks
It is possible to persist a connection for a remote file system, to quickly reconnect without using the connection dialog. See the Configuration section below.
Archives
F2 Commander can read and extract archives and compressed files supported by libarchive. A non-exhaustive list includes:
- ZIP
- TAR, XAR
- LHA/LZH
- ISO 9660 (optical disc files)
- cpio, mtree, shar, ar, pax
- RAR
- MS CAB
- 7-Zip
- WARC
- And more...
See libarchive documentation for the complete list.
Viewing and Extracting
To view and extract files from an archive:
- Navigate to an archive file
- Press Enter to open it
- Browse the contents like a regular directory
- Copy files out to extract them
Creating Archives
To create an archive:
- Select one or multiple files and directories
- Open the Command Palette (Ctrl+P)
- Choose "Create an archive"
- Enter the target filename with appropriate extension
Target file extension determines the archival and compression format. Following extensions are recognized:
.zip, .tar, .tar.gz, .tgz, .tar.bz2, .tbz2, .tar.xz, .txz, .7z, .ar, .cpio, .warc
File Preview
F2 Commander can preview text files and images.
To open a file preview panel:
- Press Ctrl+E or Ctrl+R to switch to the "Preview" panel on the left or right
- Navigate to the file to preview in the other panel
Text File Preview
For text files, a preview of the file is displayed with syntax highlighting if the file type is recognized. Only the beginning of the file is shown. Use the View action (v/F3) to view the complete file in your default viewer program ($VIEWER).
Image and PDF Preview
Image preview only works in terminal emulators that support TGP or Sixel protocols.
Directory Preview
When a directory is selected, the preview panel shows a tree view of its contents.
Panel Types
F2 Commander comes with these panel types:
- Files - Default panel type for file system discovery and manipulation
- Preview - Preview text and image files selected in the other Files panel
- Help - User manual (also invoked with ?/F1)
Use Ctrl+E and Ctrl+R to change the type of the panel on the left and right respectively.
Configuration
Press Ctrl+, to open the configuration dialog, or find "Configuration" action in the Command Palette (Ctrl+P).
Key Mapping
F2 Commander comes with two predefined key mappings:
- Traditional Function-key mapping: F5 to copy file, F6 to move, etc., which is well known in orthodox file managers
- Vi-like mnemonics-based mapping: c to copy, m to move, etc.
The Vi-like mapping is designed for modern laptop keyboards, provided that you use the top row keys as media keys (brightness, track control, etc.). It is enabled by default. You can easily switch to the "Function keys" in the configuration.
Themes (Colors)
Several color themes are built-in and can be changed in the configuration dialog.
At the moment the colors are not customizable (you can only use the predefined themes).
Configuration File
You typically won't need to modify the configuration file directly, as the GUI configuration dialog handles most settings. However, if absolutely needed, your configuration file location is platform-specific:
- Linux:
~/.config/f2commander/config.json - macOS:
~/Library/Application Support/f2commander/config.json - Windows (WSL): Check output of
f2 --help
Note: The application may write to the configuration file as you use it. Be careful when manually editing.
Remote File Systems Configuration
Connection configuration for remote file systems can be persisted and accessed from the "Bookmarks" dialog.
Connection configuration is defined under file_systems in the config file, as a list of connection objects. Each connection object defines:
display_name- A title shown in the bookmarks listprotocol- Name of the protocol recognized by fsspecpath- Optional default path to navigate to upon connecting (defaults to root)- Other keys are considered to be fsspec
storage_options
Example configuration for connecting to an ADLS Gen2 storage account:
file_systems = [
{
"display_name": "My BLOB storage",
"protocol": "abfs",
"params": {
"account_name": "myaccount",
"account_key": "mykey"
}
}
]
Refer to the documentation of the installed additional packages (s3fs, gcsfs, etc.) for more information about the remote file system configuration options.