Difference between revisions of "Introduction to Linux"

From Void-Byte
Jump to navigation Jump to search
Line 7: Line 7:
  
 
===Commands===
 
===Commands===
 
+
{| class="wikitable"
'''cat''' - Used to concatenate files, and print to stdout.  
+
|+
Syntax: cat [-options] <path/file>
+
!Name
 
+
!Description
Example: cat readme.txt
+
!Syntax
'''cp''' - Used to copy files and directories.
+
!Example
Syntax: cp [-options] <source> <destination>
+
|-
 
+
|'''cat'''
Example: cp -R olddirectory newdirectory
+
|Used to concatenate files, and print to stdout.
'''echo''' - Used to print text to stdout.
+
|cat [-options] <path/file>
Syntax: echo [-option] <string>
+
|cat readme.txt
 
+
|-
Example: echo -e This my first line \n This is my second line \n This is my third line
+
|'''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