Linux Basic Command - System Information Viewing; Administration
Here is a detailed introduction to the unamehostnamruptimedfdufree and top commands in Linux, which are very practical in daily work. Here is a detailed introduction to these commands:1
Here is a detailed introduction to the unamehostnamruptimedfdufree and top commands in Linux, which are very practical in daily work. Here is a detailed introduction to these commands:
1. uname
The uname command is used to display information about the current operating system. Here are some commonly used options and examples:
-Display operating system name: ` uname s`
-Display operating system version: ` uname r`
-Display operating system architecture: ` uname m`
-Display all information: 'uname a', which is commonly used
2. hostname
The hostname command is used to display or set the host name of the system. Here are some commonly used options and examples:
-Display current host name: 'hostname', default host name, not modified
-Set a new host name: ` hostnamenew hostname`
Log out of the session, log in again to view the host name
3. Uptime
The uptime command is used to display the system's runtime and average load. Here are some commonly used options and examples:
-Display the system runtime and average load: 'uptime', it's okay if you don't understand it, you'll understand it in the future.
-Display system runtime: ` uptime p`
4. df
The df command is used to display the disk space usage of the file system. Here are some commonly used options and examples:
-Display the disk space usage of all file systems: 'df h', marked as the root directory
-Display the disk space usage of the specified file system: ` df h/dev/sda1`
5. du
The du command is used to display the disk space usage of a directory or file. Here are some commonly used options and examples:
-Display the disk space usage of the directory: ` du h/path/to/directory`
Switch to the usr directory first. There are no files in the root directory, so the demonstration of this command is not effective
-Display the disk space usage of files: ` du h/path/to/file`
Display the disk usage of all files in the current directory
Display the usage of the specified file directory disk du-h/usr/etc/
6. free
The free command is used to display the memory usage of the system. Here are some commonly used options and examples:
-Display system memory usage: ` free h`
-Display the usage of swap space in the system: ` free h t`
7. Top
The top command is used to display system process information and system resource usage. Here are some commonly used options and examples:
-Display system process information and system resource usage: ` top`
-Display process information for the specified user: ` top uuusername`
These commands are very important in the daily work of system engineers because they enable us to effectively navigate and organize files within the file system. I hope this information is helpful to you! If there are any mistakes, please feel free to provide feedback. Feel free to leave a message in the comments section and express your opinions.
Disclaimer: The content of this article is sourced from the internet. The copyright of the text, images, and other materials belongs to the original author. The platform reprints the materials for the purpose of conveying more information. The content of the article is for reference and learning only, and should not be used for commercial purposes. If it infringes on your legitimate rights and interests, please contact us promptly and we will handle it as soon as possible! We respect copyright and are committed to protecting it. Thank you for sharing.(Email:[email protected])