Navigation Commands - Linux

NOTES


As we navigate through different folders , files on our windows or android system by just clicking on them . But when we connect to them remotely via SSH we will have CLI in which we dont have GUI , so there is no chance to click on the directories / files to navigate through them . So navigation commands are most important

Command Purpose
pwd tells the present working directory or in which directory we are in
ls it will lists the files that are present in the directory
cd it will make us to change the directory i.e navigate to different folders
cd .. it will step back us to the previous folder that we came from / simply back click

There are also some special flags that can be used with ls command that will extend the functionality of ls command

ls -l will display more information of each file and directory out there like

Permissions of the particular file
Size of the file
user and group that can access that file
Date and time the file is created

!lslaa.png

Column Content Description
drwxr-xr-x Type and permissions
satvik Owner of the file/directory
satvik Group owner of the file/directory
21 Size of the file or the number of blocks used to store the directory information
12 Nov 00:38 Date and time
Desktop Directory name

we can see the hidden files of that directory by executing

ls -la

We can clear the whole thing on Terminal when it gets messy by simply executing ‘clear’ command or using CTRL+L Shortcut.

We can get the history of the commands we have executed so far by using ‘history command ‘ or CTRL+R Shortcut