Introduction to Linux
Jump to navigation
Jump to search
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 | Concatenate files, and print to stdout. | cat [-options] <path/file> | cat readme.txt |
cp | Copy files or directories. | cp [-options] <source> <destination> | cp -R olddirectory newdirectory |
echo | Print text to stdout. | echo [-options] <string> | echo -e This my first line \n This is my second line |
ls | List directory contents. | ls [-options] <path/file> | ls -alh /var/log |
mkdir | Make a directory. | mkdir [-options] <path/directory> | mkdir -p /my/directory/path |
mv | Move or rename a file. | mv [-options] <source> <destination> | mv /from/here/file1.txt /to/here/file1.txt |
pwd | Print the current working directory. | pwd [-options] | pwd -P |
touch | Change file timestamp or create blank file. | touch [-options] <path/file> | touch -c update.txt |