`

linux system command

阅读更多

# uname -a               # 查看内核/操作系统/CPU信息
# head -n 1 /etc/issue   # 查看操作系统版本
# cat /proc/cpuinfo      # 查看CPU信息
# hostname               # 查看计算机名
# lspci -tv              # 列出所有PCI设备
# lsusb -tv              # 列出所有USB设备
# lsmod                  # 列出加载的内核模块
# env                    # 查看环境变量资源

# free -m                # 查看内存使用量和交换区使用量
# df -h                  # 查看各分区使用情况
# du -sh <目录名>        # 查看指定目录的大小
# grep MemTotal /proc/meminfo   # 查看内存总量
# grep MemFree /proc/meminfo    # 查看空闲内存量
# uptime                 # 查看系统运行时间、用户数、负载
# cat /proc/loadavg      # 查看系统负载磁盘和分区

# mount | column -t      # 查看挂接的分区状态
# fdisk -l               # 查看所有分区
# swapon -s              # 查看所有交换分区
# hdparm -i /dev/hda     # 查看磁盘参数(仅适用于IDE设备)
# dmesg | grep IDE       # 查看启动时IDE设备检测状况网络

# ifconfig               # 查看所有网络接口的属性
# iptables -L            # 查看防火墙设置
# route -n               # 查看路由表
# netstat -lntp          # 查看所有监听端口
# netstat -antp          # 查看所有已经建立的连接
# netstat -s             # 查看网络统计信息进程

# ps -ef                 # 查看所有进程
# top                    # 实时显示进程状态用户

# w                      # 查看活动用户
# id <用户名>            # 查看指定用户信息
# last                   # 查看用户登录日志
# cut -d: -f1 /etc/passwd   # 查看系统所有用户
# cut -d: -f1 /etc/group    # 查看系统所有组
# crontab -l             # 查看当前用户的计划任务服务

# chkconfig --list       # 列出所有系统服务
# chkconfig --list | grep on    # 列出所有启动的系统服务程序

# rpm -qa                # 查看所有安装的软件包
getconf LONG_BIT 查看系统位数

分享到:
评论

相关推荐

    Linux command introduction.

    command line to tell a Linux system what to do. Here’s an example command that counts lines of text in a file, myfle: wc -l myfile We’ll cover the most important Linux commands for the aver‐ age ...

    The Linux Command Line 原版pdf by Shotts

    Unix-like operating system. That’s an important story too, but most other Linux books have that one, as well. No, I want to tell you the story of how you can take back control of your computer.

    linux system

    linux rhce command 中的其中一部分

    Linux命令搜索工具linux-command.zip

    linux-command Linux命令大全搜索工具,内容包含Linux命令手册、详解、学习、搜集。   Linux命令分类 这里存放Linux 命令大全并不全,你可以通过linux-command来搜索,它是把 command ...

    HarmonyOS(commandline-tools-linux-2.0.0.2.zip)

    在给定的压缩包"HarmonyOS(commandline-tools-linux-2.0.0.2.zip)"中,包含的是HarmonyOS的命令行工具,主要用于开发者在Linux环境下对系统进行构建、编译、调试等操作。这些工具是开发和维护HarmonyOS应用程序不...

    Unix-like system command mindmap

    A Unix-like system command refers to commands that used in Unix and Unix-like operating systems,such as Linux.These commands are used to perform various tasks like file manipulation,process control,...

    Beginning the Linux Command Line(Apress,2ed,2015).pdf

    Now this 2nd Edition of Beginning the Linux Command Line updates to the very latest versions of the Linux Operating System, including the new Btrfs file system and its management, and systemd boot ...

    Beginning the Linux Command Line(2nd).pdf 2016第2版

    Now this Second Edition of Beginning the Linux Command Line updates to the very latest versions of the Linux Operating System, including the new Btrfs file system and its management, and systemd boot...

    Python for Unix and Linux System Administration/Python UNIX和Linux系统管理指南(源代码)

    Python is an ideal language for solving problems, especially for Linux and Unix. With this pragmatic book, administrators can review various tasks that often occur in the management of these systems, ...

    linux C程序中获取shell脚本输出(如获取system命令输出)

    ### Linux C程序中获取Shell脚本输出方法详解 在Linux环境下进行C语言编程时,我们经常需要执行系统命令并获取其输出结果。这种需求在多种场景下都非常常见,比如自动化脚本开发、系统监控工具编写等。本文将详细...

    linux下system函数的简单分析

    简单分析了linux下system函数的相关内容,具体内容如下 int __libc_system &#40;const char *line&#41; { if (line == NULL) /* Check that we have a command processor available. It might not be available ...

    Linux for Beginners: An Introduction to the Linux Operating System

    The file system layout of Linux systems and where to find programs, configurations, and documentation. The basic Linux commands you'll use most often. Creating, renaming, moving, and deleting ...

    DB2 System Command Examples

    - Linux/UNIX:/opt/IBM/db2/V8.1/das/adm - **授权**:dasadm - **示例**: - 启用自动启动:`dasauto-on` - 禁用自动启动:`dasauto-off` #### 2. dascrt (仅限 UNIX) - **功能**:创建一个DB2管理服务器。 -...

    Data.Analytics.and.Linux.Operating.System.1541352149.epub

    Analytics and beginning your quest to understand the Linux Command Line Operating System Two manuscripts for the price of one! What's included in this 2 book bundle manuscript: Data Analytics: ...

Global site tag (gtag.js) - Google Analytics