Commands we type goes via shell (shell is like a brand). Example - Bourne Shell, Korn Shell, bash - bourne again shell, zsh and many more. Every command you run is a utility given to you. Any file/directory whose name starts with ".", it is a hidden file/directory
User ---> (Shell + Utilities) ---> Kernel
Permission:
Linux was designed to allow many users to access single system at the same time. Also files need to be protected from each other.
- To list all the directories/files:
ls
- To get the long listing version of files/directories:
ls -l
- To clear the screen:
Ctrl + L
/clear
- To know what kind of system you are using:
uname
/uname -a
- To know the kernel release version:
uname -r
- To get the manual of particular command:
man uname
- To get to know from how much time your system is ON:
uptime
- To change/navigate the directory:
cd
- To know the present working directory:
pwd
- To go one directory back:
cd..
- To create a directory:
mkdir _name_
- To peform the aliasing of commands(temporary):
alias ll="ls -l"
- To list all the files (including hidden ones):
ls -a
- To get today's date:
date
- To get the calendar:
cal
- To get to know how many users are logged in your system:
w
- To get to know from whose credentials you are logged in:
whoami
- To find the location/path of a program/file:
whereis _name_
- To delete/remove a file:
rm _name_
- To delete a directory:
rm -r _name_
(-r here refers to delete recursively all the files present inside the directory) - Forceful removal:
rm -rf _name_
(not advised to use) - To create a new file:
touch _name_
- To know what few commands we run previously:
history
- To store the previous commands in afile:
histroy > _nameOfFile_
- To read/open a text/code based file:
cat _nameOfFile_
- To read the head/top part of a file:
head _nameOfFile_
- To read the tail/bottom part of a file:
tail _nameOfFile_