Intro to the Command Line Flashcards
What does bash display as the default prompt
$
What does Zsh display at the default prompt?
%
What do both Zsh and bash if you are logged into root?
#
What is the command to show the current shell?
echo $SHELL
What form do CLI commands always take?
[command] [arguments…]
What can the first portion of a CLI command be?
An existing command like echo or a file path
What is a flag?
a flag is a special argument, passed first to the command. They start with - for abreviated flags like -a, or – for full word flags like –format
command: change directory
cd name
command: list files in current directory
ls
command: display the path of the current directory
pwd
command: create a file
touch
command: create a directory
mkdir
command: remove a file or directory
rm
command: copy a file or directory
cp
command: print text to STDout
echo
command: display contents of a file
cat
command: display the contents of a file starting at the top with page flip option
more
command: display contents of a file with multi-directional scroll
less