Skip to main content

Command Palette

Search for a command to run...

Additional Linux Commands and SSH Basics for Beginners

Updated
3 min read
Additional Linux Commands and SSH Basics for Beginners

Linux provides several commands that help users communicate with servers, transfer files, search text patterns, and securely access remote systems. Understanding these commands is essential for system administration and DevOps.


Understanding Nginx

Nginx is a web server and reverse proxy server used to host websites and manage web traffic efficiently.

⭐ Features of Nginx

• High performance and scalability.

• Supports reverse proxy functionality.

• Handles multiple connections efficiently.

• Widely used in cloud and DevOps environments.


Security Groups

Security groups act as virtual firewalls in AWS and control network traffic to EC2 instances.

⭐ Features of Security Groups

• Stateful firewall.

• Controls inbound traffic.

• Controls outbound traffic.

• Improves instance security.


AMI ID (Amazon Machine Image)

An AMI (Amazon Machine Image) contains the software configuration required to launch an EC2 instance.

⭐ Key Points

• Different operating systems have different AMI IDs.

• AMIs contain operating system specifications.

• Used while creating EC2 instances.


Curl Command

The "curl" command transfers data between a client and a server using various protocols.

⭐ Syntax

curl

⭐ Example

curl https://www.google.com

⭐ Uses

• Transfers data through APIs.

• Tests server responses.

• Retrieves web content.


Wget Command

The "wget" command is used to download files from the internet.

⭐ Syntax

wget

⭐ Example

wget https://example.com/file.zip

⭐ Uses

• Downloads files from web servers.

• Supports HTTP and HTTPS protocols.

• Useful for automated downloads.


SSH (Secure Shell)

SSH is a network protocol used to securely connect to remote servers.

⭐ Features of SSH

• Provides secure communication.

• Encrypts transmitted data.

• Enables remote administration.

⭐ Basic SSH Command

ssh username@server-ip

⭐ Using a Key File

ssh -i keyfile.pem username@server-ip

Here:

• "-i" specifies the key file.

• "keyfile.pem" is the private key used for authentication.


Grep Command

The "grep" command is used to search for patterns in files.

⭐ Syntax

. grep "pattern" filename

⭐ Example

. grep "linux" file.txt

⭐ Uses

• Searches for specific words.

• Finds matching patterns in files.


Case-Insensitive Search Using Grep

The "-i" option allows searching without considering uppercase and lowercase letters.

⭐ Example

grep -i "linux" file.txt

⭐ Advantage

• Matches both "Linux" and "linux".

• Performs case-insensitive searches.


Recursive Search Using Grep

The "-r" option enables recursive searching inside directories and subdirectories.

⭐ Example

grep -r "linux" .

⭐ Uses

• Searches multiple files.

• Searches entire directories recursively.


Conclusion

Linux commands such as "curl", "wget", "ssh", and "grep" are fundamental tools for system administrators and DevOps engineers. Mastering these commands helps users manage servers, transfer data, and perform efficient text searches while ensuring secure communication.I excluded the topic "Deploying a webpage using Nginx through EC2" (the text inside brackets) as you requested and included only the relevant Linux topics from your notes in a professional Hashnode article format.