Run cat ./- from the Bandit Level 1 home directory. The ./ prefix makes the single-dash filename an explicit path, so GNU cat opens the file and prints its contents instead of treating a bare - as standard input.
What Bandit Level 1 asks you to do
The OverTheWire Bandit Level 1 → Level 2 goal says the next password is stored in a file named - in the home directory. It lists ls, cd, cat, file, du, and find as commands that may help.
As an Amazon Associate I earn from qualifying purchases.
Bandit is intended for absolute beginners and uses successive levels to teach command-line concepts. The official overview publishes the SSH host bandit.labs.overthewire.org and port 2220. Check the official pages for current access details and credentials, which can change.
Read the dash-named file
- Connect to the appropriate Bandit account using the current access information from OverTheWire.
- Make sure you are in the account’s home directory, where the level says the file is stored.
- Run
cat ./-. The file’s contents, including the next-level password, appear in the terminal. - Use that displayed password to continue to the next level. Avoid relying on passwords copied from old writeups: OverTheWire notes that passwords occasionally change.
Why cat ./- works
In GNU Coreutils, a file operand consisting of a single - tells cat to read standard input, not to open a local file with that name. That behavior is documented in the GNU Coreutils 9.11 cat invocation documentation.
#1 Best Overall
By contrast, ./- is a relative pathname: it means “the entry named - in the current directory.” The leading ./ makes the argument a path rather than the special bare-dash operand. GNU’s guidance also gives ./- as a way to refer to a file with this name.
Why not use cat -- -?
-- conventionally marks the end of option parsing, which helps when a filename begins with a dash and might otherwise look like an option. But it does not change GNU cat’s special meaning for a single-dash file operand. For this exact filename, use cat ./-.
Quick Recap
Best Value
Rank #4
Rank #3
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




