Hi all, in this article I will share 10 basic commands for RedHat 7 or Linux which are commonly used by system administrators. Hopefully, it can be a reference for learning for beginners.
1. Uptime Command
On a RedHat or Linux operating system, the way to find out how long the server has been up for is using the #uptime command.
2.w Command (anyone currently accessing)
In simple terms, the #w command will display who is currently accessing the server as well as displaying detailed information on the process being carried out by each user.
This kind of commands usually used in many online betting sites, this command can help you monitor who is using the server. In other words, it will help you maintain the security level on your site. A giant online betting company such as YukBola from Asia, manage to keep their data safe by utilizing this command to the fullest. Thus, nowadays this company is being trusted by its loyal members for a place to play their bet without any risk and concern about safety. Super safe!
3. ls Command (view directory contents)
#Ls command is used to view the contents of a directory.
Command #ls -ltrh to display detailed directory contents including permissions, owner, file size, and file names.
4. Copy, Move & Rename Command
Command for file copy is
server # cp filename / destination directory / filename
The command to move a file is
server # mv filename / destination directory / filename
The command to rename files in the same directory is
server # cp -i nama_file nama_baru then the server will ask for approval whether the file can be overwritten or not
5. Cat Command (view the contents of the text file)
Command #cat is usually used to view the contents of a text file
6. Cd Command (move directory)
As the name implies, the #cd (change directory) command is used to move to another directory. For example, I want access to the / home / guest directory, then the command that needs to be typed:
7. Pwd Command (current directory location)
Command #pwd means the present work directory or directory that I am currently accessing.
8. SSH Command (secure shell / access to server)
SSH command is usually used for access to another RedHat or Linux server.
server # ssh username @ ip_address
For example, I want to SSH to server 192.168.22.100 using the username root
9. Top Command (see usage and process)
The #top command is used to see real time CPU, memory, swap, and process usage.
10. Grep Command (sort directory contents)
Grep is very useful for sorting files in a directory or sorting a running process name based on text (string).
For example, I want to see the file name or directory name that has the word ‘lost’
For example, I want to see a process running with the name ‘crond’
Those are the 10 basic RedHat commands that are commonly used every day, hopefully, they can be useful. Keep learning and feel free to leave comments or questions for discussion together. I will respond as soon as possible and see you in the next article.