Mark As Completed Discussion

One Pager Cheat Sheet

  • In this lesson, we will learn about bash and its basic commands, with a focus on understanding how to perform operations using the command line.
  • Bash enables users to provide commands after a prompt, which then executes these commands and displays the prompt again when done.
  • With basic Bash commands you can navigate through a system to effectively manage files and directories.
  • The echo command 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 pwd is used to Print Working Directory, displaying the current directory in the output.
  • ls is a command used to list down the contents of a directory, often with options or a specific location specified.
  • We can use the cd command to change directory both with a specific path and by going up the hierarchy of parent directories with a shortcut.
  • The echo command can be modified using options, flags and/or switches, 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, and deleted.
  • The mkdir command allows users to Make Directory with the specified name, using the syntax mkdir[option]<directory name>.
  • Using rmdir with the syntax: rmdir[option]<directory name> removes a specified and empty directory, however, there is no undo option so users should exercise caution.
  • The touch command is used to create blank files with the syntax touch[option]<filename>.
  • The command rm is used to remove files, with the addition of the -r option allowing the recursive removal of non-empty directories.
  • The mv command can be used to move or rename a file or directory.
  • The touch command is used to create empty files and update file timestamps, while the mkDIR command is used to create new directories that don't already exist.
  • This command does not rename the file but instead moves it using the mv command 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.