In this tutiorial i’m going to share Top 50 Linux command for administrator use.
- ls Command
ls
is probably the first command every Linux user types in their terminal. It allows you to list the contents of the directory you want (the current directory by default), including files and other nested directories.
Example:
ls
2. cd Command:
cd
stands for “change directory.” It allows you to navigate between directories in the Linux file system.
Example:
cd /path/to/directory
3. mkdir Command:
mkdir
stands for “make directory.” It is used to create new directories.
Example
mkdir new_directory
4. rm Command
rm
stands for “remove.” It is used to delete files and directories.
Example
rm file.txt
5. rmdir Command
rmdir
stands for “remove directory.” It is used to delete empty directories.
Example:-
rmdir empty_directory
6. cp Command:
cp
stands for “copy.” It is used to copy files and directories from one location to another.
Example:
cp file.txt /destination/path
7. mv Command:
mv stands for “move.” It is used to move files and directories from one location to another or to rename them.
Example:
mv file.txt new_location/
8. cat Command:
cat is short for “concatenate.” It is used to display the contents of a file.
Example:
cat file.txt
less Command:
less is a file viewer similar to more, but it allows backward as well as forward navigation.
Example:
less file.txt
more Command:
more is a file viewer that displays the contents of a file one page at a time.
Example:
more file.txt
head Command:
head is used to display the beginning of a file.
Example:
head file.txt
tail Command:
tail is used to display the end of a file.
Example:
tail file.txt
14. touch Command:
touch is used to create an empty file or update the timestamp of an existing file.
Example:
touch new_file.txt
15. chmod Command:
chmod stands for “change mode.” It is used to change the permissions of a file or directory.
Example:
chmod 755 file.txt
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 reading. 👍👍