Difference between revisions of "Introduction to Linux"
Jump to navigation
Jump to search
Line 7: | Line 7: | ||
===Commands=== | ===Commands=== | ||
− | + | {| class="wikitable" | |
− | '''cat''' | + | |+ |
− | + | !Name | |
− | + | !Description | |
− | + | !Syntax | |
− | '''cp''' | + | !Example |
− | + | |- | |
− | + | |'''cat''' | |
− | + | |Used to concatenate files, and print to stdout. | |
− | '''echo''' | + | |cat [-options] <path/file> |
− | + | |cat readme.txt | |
− | + | |- | |
− | + | |'''cp''' | |
− | '''ls''' - | + | |Used to copy files and directories. |
− | + | |cp [-options] <source> <destination> | |
− | + | |cp -R olddirectory newdirectory | |
− | + | |- | |
− | '''mkdir''' | + | |'''echo''' |
− | + | |Used to print text to stdout. | |
− | + | |echo [-options] <string> | |
− | + | |echo -e This my first line \n This is my second line | |
− | '''mv''' | + | |- |
− | + | |'''ls''' | |
− | + | |Used to list directory contents. | |
− | + | |ls [-options] <path/file> | |
− | '''pwd''' | + | |ls -alh /var/log |
− | + | |- | |
− | + | |'''mkdir''' | |
− | + | | | |
− | '''touch''' | + | | |
+ | | | ||
+ | |- | ||
+ | |'''mv''' | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |'''pwd''' | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |'''touch''' | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | |} | ||
+ | <br /> |
Revision as of 16:25, 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
Name | Description | Syntax | Example |
---|---|---|---|
cat | Used to concatenate files, and print to stdout. | cat [-options] <path/file> | cat readme.txt |
cp | Used to copy files and directories. | cp [-options] <source> <destination> | cp -R olddirectory newdirectory |
echo | Used to print text to stdout. | echo [-options] <string> | echo -e This my first line \n This is my second line |
ls | Used to list directory contents. | ls [-options] <path/file> | ls -alh /var/log |
mkdir | |||
mv | |||
pwd | |||
touch |