Difference between revisions of "Introduction to Linux"
Jump to navigation
Jump to search
Line 8: | Line 8: | ||
===Commands=== | ===Commands=== | ||
− | + | '''cat''' - Used to concatenate files, and print to stdout. | |
+ | Syntax: cat [-options] <path/file> | ||
− | + | Example: cat readme.txt | |
+ | '''cp''' - Used to copy files and directories. | ||
+ | Syntax: cp [-options] <source> <destination> | ||
− | + | Example: cp -R olddirectory newdirectory | |
+ | '''echo''' - Used to print text to stdout. | ||
+ | Syntax: echo [-option] <string> | ||
− | + | Example: echo -e This my first line \n This is my second line \n This is my third line | |
+ | '''ls''' - | ||
+ | |||
− | + | ||
+ | '''mkdir''' - | ||
+ | |||
− | + | ||
+ | '''mv''' - | ||
+ | |||
− | + | ||
+ | '''pwd''' - | ||
+ | |||
− | + | ||
− | + | '''touch''' - | |
− |
Revision as of 16:12, 8 June 2020
Basic Commands
These are the most basic commands that you should know as a Linux System Administrator.
Command Syntax
Commands that utilize the Bash shell follow this common syntax.
command [-options] [arguments]
Commands
cat - Used to concatenate files, and print to stdout.
Syntax: cat [-options] <path/file>
Example: cat readme.txt
cp - Used to copy files and directories.
Syntax: cp [-options] <source> <destination>
Example: cp -R olddirectory newdirectory
echo - Used to print text to stdout.
Syntax: echo [-option] <string>
Example: echo -e This my first line \n This is my second line \n This is my third line
ls -
mkdir -
mv -
pwd -
touch -