# Introduction to Linux part - 2

\- If you want to give rwx(read,write,execute) file permission to all:

command: chmod 777 upper.txt

command: ls -l upper.txt

\- 777-------&gt;read,write,execute

\- 4 -----&gt;Read

\- 2 -----&gt; write

\- 1 -----&gt; execute

\- 0 -----&gt; No permission

\-If you want to check the user: whoami

\- If you want to change the owner:

\- command: sudo chown root upper.txt

\- command:cat upper.txt

\- sudo upper.txt

\- If you want to check name exist inside the file: grep "kunal" names.txt

\- If you want to find line number of the file: grep -n "kunal" names.txt

\- If you want to run previous command: ! find

\- If you want to download something: wget (paste the url)

\- If you want to find operating system name: uname

\- If you want to check type of operating system: uname -o

\- If you want to check architecture: uname -m

\- If you want to check kernel version: uname -r

\- If you want to check information about cpu details: lscpu

\- If you want to check list of open file: lsof

\- If you want to check active port: netstat

\- Terminal shortcuts:

\- ctrl + A -------&gt; Move toward first position

\- ctrl + E -------&gt; Move toward last position

\- ctrl + K -------&gt; To remove word

\- ctrl + V --------&gt; Remove everything

\- If you want to pickup command from history: history

\- command: ! 757

\- If you want to check which processes are running: top
