Difference between revisions of "Introduction to Linux"

From Void-Byte
Jump to navigation Jump to search
Line 8: Line 8:
 
===Commands===
 
===Commands===
  
cp
+
'''cat''' - Used to concatenate files, and print to stdout.
 +
Syntax: cat [-options] <path/file>
  
echo
+
Example: cat readme.txt
 +
'''cp''' - Used to copy files and directories.
 +
Syntax: cp [-options] <source> <destination>
  
ls
+
Example: cp -R olddirectory newdirectory
 +
'''echo''' - Used to print text to stdout.
 +
Syntax: echo [-option] <string>
  
mkdir
+
Example: echo -e This my first line \n This is my second line \n This is my third line
 +
'''ls''' -
 +
  
mv
+
 +
'''mkdir''' -
 +
  
pwd
+
 +
'''mv''' -
 +
  
touch
+
 +
'''pwd''' -
 +
  
==cat==
+
Used ton concatenate files, and print to stdout.
+
'''touch''' -
'''Syntax''': cat [-options] [path/file]
 

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 -