Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Top 50 Linux Commands for Scuring Linux Server

1. passwd Command:

Changes a user’s password.

Example:

passwd username

2. useradd Command:

Creates a new user account.

Example:-

useradd username

3. userdel Command

Deletes a user account.

Example :-

userdel username

4. groupadd Command:

Creates a new group.

groupadd groupname

5. groupdel Command

Deletes a group.

Example :-

groupdel groupname

6. chmod Command:

Changes file permissions.

Example :-

chmod 600 file.txt

7. chown Command

Changes the owner of a file or directory.

Example

chown user:group file.txt

8. chgrp Command

Changes the group ownership of a file or directory.

Example

chgrp groupname file.txt

9. ssh Command

Securely connects to a remote server.

Example:-

ssh user@hostname

10 . scp Command

Securely copies files between hosts.

Example :-

scp file.txt user@hostname:/destination/path

11. ufw Command:

Uncomplicated Firewall, a user-friendly interface to manage iptables firewall.

Example :-

ufw enable

12. iptables Command

Configures firewall rules.

Example :-

iptables -A INPUT -p tcp --dport 22 -j ACCEPT

13. fail2ban Command

Protects against brute-force attacks by monitoring logs and blocking malicious IP addresses.

Example :-

fail2ban-client status

14. sudo Command

Allows users to execute commands with superuser privileges.

Example :-

sudo command

15. ssh-keygen Command

Generates SSH key pairs for authentication

Example:-

ssh-keygen -t rsa

16. chown Command:

chown stands for “change owner.” It is used to change the owner of a file or directory.
Example:

chown user:group file.txt

17. chgrp Command:

chgrp stands for “change group.” It is used to change the group ownership of a file or directory.
Example:

chgrp group file.txt

18. find Command:

find is used to search for files and directories in a directory hierarchy.
Example:

find /path/to/search -name "file.txt"

19. locate Command:

locate is used to find files by name.
Example:

locate file.txt

20. du Command:

du stands for “disk usage.” It is used to display the disk usage of files and directories.
Example:

du -sh directory/

21 df Command:

df stands for “disk free.” It is used to display disk space usage and availability.
Example:

df -h

22. free Command:

free is used to display free and used memory in the system.
Example:

free -h

23. top Command:

top is used to display system processes and resource usage in real-time.
Example:

 top

24. ps Command:

ps is used to display a snapshot of current processes.
Example:

ps aux

25. kill Command:

kill is used to terminate processes.
Example:

kill PID


26. sudo Command:

sudo is used to execute a command as another user, typically the superuser.
Example:

sudo command

27 su Command:

su is used to switch user accounts or become the superuser.
Example:

su username

28. passwd Command:

passwd is used to change a user’s password.
Example:

passwd username

29. useradd Command:

useradd is used to create a new user account.
Example:

useradd username


30 userdel Command:

userdel is used to delete a user account.
Example:

userdel username

Thanks for learning 👍👍

Hi I am Amit Kumar Thakur Experienced as s Software Developer with a demonstrated history of working in the information technology and services industry. Skilled in HTML, CSS, Bootstrap4, PHP, Laravel-9 , REST API,FB API,Google API, Youtube Api, Bitbucket,Github,Linux and jQuery. Strong engineering professional focused in Computer/Information Technology Administration and Management. Currently my profile is to Software Developer, analyze the requirement, creating frame for web application, coding and maintenance.

Related Posts

Linux Commands to Troubleshoot Performance Issues

In this tutorial we’re going to learn how to Troubleshoot Performance Issues with the CPU, RAM, disc I/O, network usage, and general responsiveness of the system. You…

Here’s a list of 50 Linux commands commonly used for troubleshooting a Linux server:

1. ping Command Tests connectivity to a remote host. 2. netstat Command Displays network connections, routing tables, interface statistics, masquerade connections, and multicast memberships. Output: – 3….

Top 50 Linux Commands for Administrator

In this tutiorial i’m going to share Top 50 Linux command for administrator use. ls is probably the first command every Linux user types in their terminal….

How to connect redis in laravel project ?

In this tutorial we’re going to learn how to connect redis database in laravel project. I have mentioned in step by step ini very easy way. What…

Problem 1 – laravel/passport[v11.5.0, …, v11.8.4] require league/oauth2-server ^8.2

In this tutorial we’re going to solve then error Problem 1 – laravel/passport[v11.5.0, …, v11.8.4] require league/oauth2-server ^8.2 Error :- Solutions : – Now issue has been…

Traceback (most recent call last):File “/usr/bin/pipenv”, line 33, insys.exit(load_entry_point(‘pipenv==11.9.0’, ‘console_scripts’, ‘pipenv’)())

In this tutorial i’m going to solve the issue “Traceback (most recent call last):File “/usr/bin/pipenv”, line 33, insys.exit(load_entry_point(‘pipenv==11.9.0’, ‘console_scripts’, ‘pipenv’)())” Error :- Solutions :-

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x