Home > Articles > Operating Systems, Server > Linux/UNIX/Open Source

Navigating Your File System in Linux

After you learn the commands in this chapter from Linux Phrasebook, 2nd Edition, you can start controlling your shell and finding out all sorts of interesting things about your files, folders, data, and environment.
This chapter is from the book

This chapter is from the book

This chapter introduces the basic commands you’ll find yourself using several times every day. Think of these as the hammer, screwdriver, and pliers that a carpenter keeps in the top of his toolbox. After you learn these commands, you can start controlling your shell and finding out all sorts of interesting things about your files, folders, data, and environment. In particular, you’ll be learning about some of the metadata—the data describing your data—that Linux has to keep track of, and it may just surprise you how much there is.

List Files and Folders

ls

The ls command is probably the one that people find themselves using the most. After all, before you can manipulate and use files in a directory (remember, file and directory are interchangeable), you first have to know what files are available. That’s where ls comes in, as it lists the files and subdirectories found in a directory.

Typing ls lists the contents of the directory in which you’re currently working. When you first log in to your shell, you’ll find yourself in your home directory. Enter ls, and you might see something like the following:

$ ls
alias Desktop   iso   pictures program_files todo
bin   documents music podcasts src           videos
  • + Share This
  • 🔖 Save To Your Account