One Pager Cheat Sheet
- In this lesson, we will learn about
bashand its basic commands, with a focus on understanding how to perform operations using the command line. - Bash enables users to provide
commandsafter aprompt, which then executes these commands and displays the prompt again when done. - With basic Bash commands you can
navigatethrough a system to effectively manage files and directories. - The
echocommand displays its arguments on the standard output on the terminal, with an optional option, and can also be used to output the values of system variables when preceded with a dollar sign ($). - The command
pwdis used toPrint Working Directory, displaying the current directory in the output. lsis a command used to list down the contents of a directory, often withoptionsor a specificlocationspecified.- We can use the
cdcommand tochange directoryboth with a specificpathand by goingup the hierarchy of parent directorieswith a shortcut. - The
echocommand can be modified usingoptions,flagsand/orswitches, such as-n, to alter its default behavior of ending the output with a newline character. - Through the use of bash commands, files can be
renamed,moved,created, anddeleted. - The
mkdircommand allows users toMake Directorywith the specified name, using the syntaxmkdir[option]<directory name>. - Using
rmdirwith thesyntax: rmdir[option]<directory name>removes a specified and empty directory, however, there is no undo option so users should exercise caution. - The
touchcommand is used to create blank files with thesyntaxtouch[option]<filename>. - The command
rmis used toremovefiles, with the addition of the-roption allowing therecursiveremoval of non-empty directories. - The
mvcommand can be used to move or rename a file or directory. - The
touchcommand is used to create empty files and update file timestamps, while themkDIRcommand is used to create new directories that don't already exist. - This command does not rename the file but instead moves it using the
mvcommand to a different directory. To customize Linux and Bash commands, use--helpoption with a command and for more advanced commands and tips, refer to our guide to advanced commands.



