Raspberry Pi Linux Lesson 3: Navigating the Folders and Files in Linux

The first thing we need to learn with Linux is how to navigate the file/folder structure in Linux. In windows we do this by just clicking on pictures of folders and files. The file structure in Linux operates the same way. We have a top level folder we call the root folder, and then we have folders and files inside of folders, and then those folders can have more folders and files. It is a tree type structure that you are already familiar with. What is different is we navigate through the files in Linux from the command lines, and not by clicking on pictures of windows and folders. Once you master the command line, you will prefer that to the clicking on pictures method of Windows.

In this lesson we will learn how to navigate through the files. In Linux, you first give the “waht”, that is what you want to do, or the command you want to do, and then you give the “where”, that is, where in the file structure you want to execute the command.

The first command we can learn is pwd. By typing pwd in the command line it will show you what folder you are presently in. That is useful as you are learning to navigate as it will always show you where you are.

The next command is ls. ls simply lists the files and folders in the present folder.

The final command covered in the video lesson above is cd, which stands for change directory.

After the command, you give the “where”, which is the path to where you want to do the command.

The method of navigating and understanding the file structure is easier to communicate by showing you, so please watch the video above. If you follow the video, you should clearly understand how the path methodology works in linux.