Introduction to Linux
- Linux is a term for all operating system which is based on Unix (Predecessor to Linux).
- First release of linux was in the year 1991.
- Linux is open source.
- Linux is secure.
- Linux is memory efficient and can even run on systems with low memory.
Basic Linux Commands
echo
- Prints the given text.
whoami
- Prints the currently logged in user name.
ls
- Lists files in the given path.
cd
- Change to the given directory.
cat
- Displays the contents of a file.
pwd
- Prints the path of current working directory.
man
- Shows manual page of the command.
sudo -l
- Check the commands that the current user can run.
Basic Flags and Switches
ls -a
- Lists files in the given path including the hidden ones.
ls --help
- Shows the help for the command.
ls -h
- Print in human readable format.
ls -lh
- Lists files including file permissions and metadata in human readable format..
Basic Operators
&
- Runs command in the background.
&&
- Combine multiple commands in one line. The second command runs only if the first one is successful.
>
- Redirects the output of a command into a file.
>>
- Same as redirect operator but instead of overwriting this operator appends to the contents of the file.