Essential 60 Practical Linux Commands Revealed (Part 2)

Linux | Red Hat Certified | IT Technology | Operations Engineer
👇 Join the technical exchange QQ group of 1000 people, note 【WeChat Official Account】 for faster approval
Essential 60 Practical Linux Commands Revealed (Part 2)

Essential 60 Practical Linux Commands Revealed (Part 1)

31. awk:A text processing tool for text manipulation and data extraction

awk '{print $1}' file_name  # Extract the first column of data from the file

32. ssh-keygen:Generate SSH key pairs for authenticating remote servers

ssh-keygen -t rsa

33. date:Display or set the system date and time

date

Essential 60 Practical Linux Commands Revealed (Part 2)

34. echo:Output text to standard output

echo "Hello, World!"

Essential 60 Practical Linux Commands Revealed (Part 2)

35. ln:Create hard links or symbolic links

ln source_file link_name  # Create a hard link
ln -s source_file link_name  # Create a symbolic link

36. uname:Display system information

uname -a

Essential 60 Practical Linux Commands Revealed (Part 2)

37. shutdown/reboot:Shut down or restart the system

shutdown -h now  # Shut down the system immediately
reboot  # Restart the system

38. who/w:Display information about currently logged-in users

who

39. curl:Interact with network resources, supporting various protocols

curl -X GET http://example.com

40. zip/unzip:Compress and decompress ZIP files

zip archive.zip file1 file2  # Compress files
unzip archive.zip  # Decompress ZIP files

41. chmod/chown:Change file or directory permissions and ownership

chmod permissions file_name  # Change file permissions
chown owner:group file_name  # Change file owner

42. useradd/userdel:Add and delete user accounts

useradd new_user  # Add user
userdel username  # Delete user

43. passwd:Change user password

passwd username

44. cron:Task scheduler for automatically executing scheduled tasks

crontab -e  # Edit user’s scheduled tasks

45. uptime:Display system uptime and load

uptime

Essential 60 Practical Linux Commands Revealed (Part 2)

46. hostname:Display or set the computer’s hostname

hostname  # Display hostname

47. iptables/ufw:Configure firewall rules

iptables -A INPUT -p tcp --dport 80 -j ACCEPT  # Allow HTTP traffic
ufw enable  # Enable Uncomplicated Firewall

48. netstat/ss:Display network connection information

netstat -tuln  # Display all TCP and UDP ports
ss -tuln  # View network connections using Socket Stat

49. ps/top/htop:Display process information and system resource usage

ps aux  # Display all processes
top  # Monitor system resources in real time
htop  # More user-friendly process monitor

50. history:View command history

history

Essential 60 Practical Linux Commands Revealed (Part 2)

51. free:Display system memory usage

free -m  # Display memory usage in MB

52. lsblk/fdisk:View disk partition information and manage disks

lsblk  # Display block device information
fdisk /dev/sdX  # Open disk partition tool

53. nc:Network connection testing and data transfer

nc -vz host_name_or_ip port  # Test if the host's port is reachable

54. stat:Display detailed information about a file or directory

stat file_or_directory

55. nmcli:Command-line tool for managing network connections

nmcli connection show  # Display network connection information

56. tailf:Real-time tracking of the end of a file, similar to tail -f

tailf file_name

57. scp:Securely copy files from local to remote host or from remote host to local

scp local_file remote_user@remote_host:/remote/directory  # From local to remote
scp remote_user@remote_host:/remote/file local_directory  # From remote to local

58. rsync:Used to synchronize files and directories between local and remote systems

rsync -avz source_directory/ remote_user@remote_host:/remote/directory/

59. dd:Used for copying and converting files

dd if=input_file of=output_file bs=block_size

60. sudo:Run commands with superuser privileges

sudo command_to_run_as_superuser

The sudo command allows ordinary users to execute commands that require superuser privileges, provided they have the appropriate permissions in the sudoers file. This is a key tool for ensuring system security, and it should be used with caution.

Essential 60 Practical Linux Commands Revealed (Part 2)

For course inquiries, add: HCIE666CCIE

↑ Or scan the QR code above ↑

What technical points and content do you want to see?

You can leave a message below to let Xiaomeng know!

Leave a Comment