随笔分类 -  Linux

摘要:ping百度发现解析使用的ipv6地址.导致访问失败; 设置优先使用ipv4 debian系:修改/etc/gai.conf,取消下面这一行的注释 precedence ::ffff:0:0/96 100 redhat系:修改/etc/gai.conf,添加如下内容 label ::1/128 0 阅读全文
posted @ 2024-01-24 15:39 savagee 阅读(756) 评论(0) 推荐(0) 编辑
摘要:1. 查看内存使用情况 free -h li@app:~$ free -h total used free shared buff/cache available Mem: 3.8Gi 554Mi 2.1Gi 222Mi 1.1Gi 2.7Gi Swap: 3.8Gi 168Mi 3.6Gi 2. 阅读全文
posted @ 2022-05-06 14:29 savagee 阅读(57) 评论(0) 推荐(0) 编辑
摘要:1.先查看磁盘的使用情况 命令:df -TH root@test:~# df -TH Filesystem Type Size Used Avail Use% Mounted on tmpfs tmpfs 206M 1.3M 204M 1% /run /dev/mapper/ubuntu--vg-u 阅读全文
posted @ 2022-05-06 14:25 savagee 阅读(345) 评论(0) 推荐(0) 编辑
摘要:1.查看防火墙状态 systemctl status firewalld 2.查看开启的端口 firewalld-cmd --zone=public --list-port 3.开放端口 firewall-cmd --zone=public --add-port=80/tcp --permanent 阅读全文
posted @ 2022-05-06 14:13 savagee 阅读(22) 评论(0) 推荐(0) 编辑
摘要:1. 方法 仅清除页面缓存较为安全 echo 1 > /proc/sys/vm/drop_caches 仅清除目录项和inode echo 2 > /proc/sys/vm/drop_caches 大清理:清除页面缓存、目录项和inode echo 3 > /proc/sys/vm/drop_cac 阅读全文
posted @ 2022-05-06 14:09 savagee 阅读(2029) 评论(0) 推荐(0) 编辑
摘要:1. 配置网络 修改/etc/netplan/00-installer-config.yaml vi /etc/netplan/00-installer-config.yaml # yaml文件名称可能不一致 # This is the network config written by 'subi 阅读全文
posted @ 2022-05-06 14:04 savagee 阅读(261) 评论(0) 推荐(0) 编辑
摘要:硬件 cpu相关 lscpu #查看CPU的统计信息 cat /proc/cpuinfo #查看CPU详细信息,如每个CPU的型号等 内存相关 free -m #概要查看内存情况,这里的单位是MB cat /proc/meminfo #查看内存详细信息 磁盘相关 lsblk #查看硬盘的分区分布,显 阅读全文
posted @ 2022-05-06 12:01 savagee 阅读(117) 评论(0) 推荐(0) 编辑
摘要:CentOS 查看发行版本 cat /etc/redhat-release cat /etc/os-release Ubuntu 查看发行版本 lsb_release -a cat /etc/issue cat /etc/os-release 阅读全文
posted @ 2022-05-06 11:45 savagee 阅读(25) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示