Linux Commands from CLI To EC2 Instance- AWS(Amazon Web Services)- These are some main commands used to connect, communicate & do some tasks on Ec2 Instance from CLI(Command Line Interface)
- ssh -i mywebserver.pem username@ipaddress is to connect to ec2 instance from ssh client software(gitbash,putty,terminal…)

- uname is to check whether ssh client software is connected to ec2 instance on aws, If it shows Linux which means i connect to my linux instance

- cat /etc/os-release is to check the Operating system Details

- cat /proc/cpuinfo is to check cpu information

- free -m is to check RAM information

- df -h is to check Disk Information

- ls / is to check root directory

- ls /bin is to check program files

- ls /etc is to check configuration

- pwd is to check directory present work

- ls is to list all the files in the directory

- vi <<TEXT FILE NAME>> is to Create New Text File
Press i to get Into Insert Mode on VI
Then Write Some Text
- Press ECE To Come Out of Insert Mode

- :w is to save the Text file
Text file is saved now
- :wq is to Save Text File & Quit The File

- vi <<Text file name>> is to list files to view to opentext file on VI(virtual editor)

- :q is to quit the Text File

- :q! is to quit without saving changes on Text File

- cat <<Text file name>> is to just view the VI file content

- ls is list files

- sudo mkdir <<new directory name>> is to create new directory in other than home directory

- ls is for listing files

- sudo vi <<new text file name>> is for creating new file in other than home directory


- :wq is for saving and quitting the text file

- ls is for List files

- cd ~ is for going to home directory,

- pwd is for checking present directory location


Thanks for sharing. I read many of your blog posts, cool, your blog is very good. https://www.binance.com/ro/join?ref=IJFGOAID