Getting Familiar with the Basics of Linux

Tree Structure of the Linux File System Hierarchy

Linux organizes its space as a file system hierarchy starting with the root folder. All other subfolders are nested inside this root folder (denoted as a / in the figure below). This can be visualized as a tree structure. All users have their own folder under the home folder. When you first start the Linux shell prompt, you are asked to setup a username and password. This becomes your default directory or home directory for all future use.

Linux File Structure Hierarchy
$ pwd
$ ls
code data
$ cd /foldername    
$ cd ..

Basic Shell Prompts for common File tasks

Use the following to make a new directory.

$ mkdir directoryname
$ cat > filename
press enter to type file content here
// ctrl+ d to escape back into the shell prompt
$ cat test.txt
test content shown here
$ rm filename



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store