Log in from a computer to take this course

You'll need to log in from a computer to start Learn the Command Line. But you can practice or keep up your coding streak with the Codecademy Go app. Download the app to get started.

apple storegoogle store

How do we view the contents of an individual file in our terminal? We can use cat.

The cat command outputs the contents of a specified file. For example:

cat action/superwoman.txt

will output all the text from superwoman.txt.

This is a useful command for peeking at files without opening them, and confirming the result of other commands that change the contents of files.

Try it out below!



In a single command (without using the cd command), use cat to output what’s inside terminator.txt.

To accomplish this in one command, use the full path command. Refer to the file directory image! Check the hint if you need help writing out the full path.


In a single command, use cat to output what’s inside fight-club.txt.

Note that there is nothing yet in the file, so the output should be empty.

Sign up to start coding

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?