← All articles
Date Published: May 2026

Level 0-4

Levels from Level 0 to 4 focuses on basic linux navigation. To login we can:

shell

                $ ssh banditX@bandit.labs.overthewire.org -p 2220
                

Level 0

This level simply requires us to read the contents of the readme file in the home directory. For this purpose we can use `cat` command which concatenate files and print the output in std output.

shell

                $ cat readme
                

Level 1

This level requires us to access a file whose name is "-". The challenge here is that most commands interpret - as the beginning of an option or flag. So to workaround it we use the relative path to directly access the file.

shell

                $ cat ./-
                

Level 2

This level requires us to access a file whose name contains spaces. Normally, spaces are used as separators. But instead here we place a '\' before space so that the space is treated as a literal not as separator.

shell

                $ cat ./--spaces\ in\ this\ filename--
                

Level 3

This level requires us to access a hidden file. In linux, a file beginning with "." makes it a hidden file. To list hidden files we can:

shell

                $ ls -a
                

Here the -a flag specifies to list hidden files as well. One observation would be that along with hidden files we also see "." and "..". This is because everything in linux is treated as a file. The single and double dot are references to the current and one level up directory respectively.

shell

                $ cat ./inhere/...Hiding-From-You
                

Level 4

This level requires us to find a file from a list of files where that particular file is of text type. We use the file command which describes the file type and we pipe it to grep which finds and matches patterns. Piping means sending the output of one command to input of another command.

shell

                $ file ./inhere/-file0* | grep "ASCII text"