1.查看系统版本

cat /etc/issue

ubuntu服务器常用命令

cat /etc/lsb-release

ubuntu服务器常用命令

 

2.查看cpu

lscpu

ubuntu服务器常用命令

3.查看内存

free -m

ubuntu服务器常用命令

4.查看硬盘大小

fdisk -l |grep Disk

ubuntu服务器常用命令

5.查看硬盘使用情况

df -h

ubuntu服务器常用命令

 

6. 查看程序内存使用情况

top

ubuntu服务器常用命令

 

7. 查看网络地址以及端口

 telnet  123.99.99.123  或 telnet 123.99.99.123 9999

ubuntu服务器常用命令

8. 查看文件夹结构

tree

使用 sudo apt-get install tree安装

9. 跟踪日志文件

tail -100 xxx.log                                  # 查看最后100行日志
tail -100 xxx.log | grep "error"            # 查看日志最后100行,并搜索“error”
tail -fn 1000 xxx.log                           # 实时循环查看最后1000行记录
tail -f xxx.log                                      # 实时查看记录

相关文章:

  • 2021-07-19
  • 2022-01-20
  • 2022-12-23
  • 2021-11-27
  • 2021-11-30
  • 2021-06-30
  • 2021-08-15
  • 2022-01-27
猜你喜欢
  • 2021-06-12
  • 2021-12-24
  • 2021-10-04
  • 2022-02-01
  • 2021-12-10
  • 2021-11-17
相关资源
相似解决方案