Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

1.

whoami - Display username

2. Bash - bourne again shell

3. PS - Display Shell name


PS means process status or process shell
4. ping 8.8.8.8 >/tmp/pingtemp &
5. kill - for killing process
6. ps -p $$ --> current process
7. echo $0 --> display current process
8. yum install zsh -y --> install zsh shell
9. exit --> come out of present shell
10. ps -ef | egrep 'bash|zsh' --> find shell process ids
11. cat /etc/passwd | grep <name>
12. ls -lh /bin/ | grep bash
13. file /bin/bash
14. echo $SHELL --> dispaly shell name
15. Alt + F2 --> open different terminal
16. stdin - 0 < ,stdout - 1 > ,stderr - 2 >
17. echo 'Warning ! Intruder alert!'
18. echo 'Warning' /tmp/alertfile
cat /temp/alertfile
ls -lh /etc/ > /temp/alertfile
19. echo 'Warning' >| /tmp/lsout
20. ls -l 1> /temp/file
21. stderr ls -l 2>/temp/error
22. echo $BASH_VERSION
echo $ HOSTNAME
echo $ SHELL
23. set | more --> Display all variables
24. env --> Dispaly environment variables
25. variables are two types
Environment varibles,shell variables
shell variables are created in comamnd winodw
defcon=5
cat $defcon

You might also like