![]() |
Figure 1 |
1. cd
cd .. – go back from a directory
2. sudo
To login as root –
sudo bash
When in root user, exit command will exit to the normal user mode.
3. df
![]() |
Figure 2 |
Gives disks related information.
4. top
Gives process related information with memory usage. To exit enter q.
5. clear
6. To find a process id of a program
ps aux | grep firefox
7. cat
cat /home/pubudu/wso2carbon.log | grep “Search Keyword”
![]() |
Figure 3 |
8. Vi Editor
vi /home/pubudu/ubuntu.xml – open to edit the xml file
:/Keyword and hit enter
:35,56d
Used to access the servers with keys. eg:
ssh -i /home/pubudu/key.pem ubuntu@192.168.32.6
10. scp
- scp -i Key_Location File_Name HostName@IP_Address: /home/remote_directory
Used to copy files from localhost to remote host. eg:
scp -i /home/pubudu/key.pem /home/carbon.xml ubuntu@192.168.32.6: /remote/directory
- scp -i Key_Location HostName@IP_Address:File_Name /home/pubudu
Used to copy files from remote host to localhost. eg:
scp -i /home/pubudu/key.pem ubuntu@192.168.32.6:conf.xml /home/pubudu/