Fc (Unix)

fc
Developer(s)Various open-source and commercial developers
Operating systemUnix, Unix-like
PlatformCross-platform
TypeCommand

fc is a standard program on Unix and Unix-like operating systems that lists, edits and re-executes commands previously entered to an interactive shell. Its name is an initialism for "fix command".[1] It is particularly helpful for editing complex, multi-line commands.

The fc command is required to be an "intrinsic" utility by POSIX,[2] and as such is implemented as a builtin in the Bash, Zsh, and Almquist shells.

Invoked with no options, fc will open a text editor, allowing the user to modify the last-run command. Upon exiting the editor, the modified command is executed in the current shell. Various other command-line options are supported, allowing quick substitutions, repetition or modification of a specific command from the session history, or a range of commands from the history.

  1. ^ "IEEE Std 1003.1-2024 - fc § Rationale". pubs.opengroup.org. Retrieved 2025-04-22.
  2. ^ "The Open Group Base Specifications Issue 8 (IEEE Std 1003.1-2024) - fc § Application Usage". pubs.opengroup.org. Retrieved 2025-04-22.

© MMXXIII Rich X Search. We shall prevail. All rights reserved. Rich X Search