Re: LEDGER_FILE / -f in .ledgerrc

Skip to first unread message

Nick Psaris

Jan 10, 2022, 10:03:17 AMJan 10
LEDGER_FILE is an environment variable which you can export in the shell (not put in the .ledgerrc)

alternatively, you can use the long option --file (not the short -f option) in .ledgerrc

On Fri, Jan 7, 2022 at 12:02 PM im hearsay <> wrote:
I want to point to my ledger file so that instead of typing 'ledger -f /path/to/file <command>' I would like to type "ledger <command>"

I'm using ledger via linux on windows 11 (wsl)

When I type 'ledger -f /path/to/file <command> my report runs successfully and as expected. When I point to the same file via ledgerrc I receive the error "directive <path/to/file> requires an argument"

In my .ledgerrc file I tried the following:

-f /mnt/c/path/to/file.ledger

My assumption is that the /mnt/c path to windows from linux wsl is causing the issue.

I'm hoping someone could help me properly format this. Thanks for your time!


You received this message because you are subscribed to the Google Groups "Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages