note
  • Introduction
  • algorithm
    • Array
    • BinarySearch
    • Bits
    • Design
    • DFS
    • DP
    • DP_bag
    • DP_stock.md
    • Hash
    • Heap
    • NodeList
    • Number
    • SlideWindow
    • Sort
    • Stack
    • String
    • Tree
  • Backend
    • express
    • koa2
    • node
    • npm
    • npx
  • db
    • mongoDB
  • Frontend
    • CSS
      • BFC
      • flex
      • layout
      • less
      • middle
      • position
      • sass
      • selector
      • 动画相关属性
      • 响应式页面
      • 层叠上下文
      • 隐藏元素
    • JS
      • Array
      • async
      • DOM
      • ES6
      • JS-军规
      • macrotask-microtask
      • practice
      • RegExp
      • this-prototype-inherit
      • type-convert
      • 前端请求
      • 浏览器加载
      • 浏览器窗口间通信
    • TS
      • note
    • Vue
      • practice
      • Component-Communicate
      • Component
      • lifecycle
      • note
      • Pinia
      • practice
      • Vue-cli
      • Vue-Router
      • Vue-Source
      • Vue2
      • Vue3
      • Vuex
    • cross-domain
    • webpack
    • 从前端角度理解缓存
    • 前端概念
    • 页面性能分析与优化
    • 页面渲染机制
  • Linux
    • basic-command
    • docker
    • java-env
    • learn
    • manage-command
    • nginx
    • Shell
    • ssh
    • tmux
    • vi
  • chrome-devtools
  • git
  • Jenkins
Powered by GitBook
On this page
  1. Linux

manage-command

网络管理

网络状态查看

  • ifconfig | ip

  • /sbin/ifconfig # 普通用户需加完整路径

    • eth0第一块网卡

或者叫

eno1 板载网卡

ens33 PCI-E网卡

enp0s3 无法获取物理信息的PCI-E网卡

CentOS 7 使用了一致性网络设备命名,以上都不匹配叫则使用eth0

  • mii-tool eth0 查看网线

  • route -n 查看网关

  • service network status

网络配置

  • hostname

路由命令

网络故障排除

  • ping ping www.taobao.com

  • traceroute

  • mtr

  • nslookup

  • telnet

  • tcpdump

  • netstat ``netstat -tlnp | grep 8080 查看端口8080的使用情况

  • ss

网络服务管理

  • sysv

  • systemd

常用网络配置文件

  • ifcfg-ethx

  • /etc/hosts

分区(分区->格式化->挂载)

  • fdisk

  • mkfs

  • parted (> 2T)

  • mount

  • /etc/fstab

计划任务

  • 一次性计划任务

    at 18:31
    echo hello > /tmp/hello.txt
    # ctrl + d提交
    atq
    
    # 非内部命令建议加上命令完整路径,脚本运行时利用source引入系统环境变量
    # 没有标准输出,要加重定向输出
  • 周期性计划任务

    crontab -l
    crontab -e
    # 分钟 小时 日期 月份 星期
    # 注意命令路径
    * * * * * /usr/bin/date >> /tmp/date.txt
    
    tail -f /var/log/corn
    # 用户计划任务文件位置
    ls /var/spool/cron
  • anacrontab 延时计划任务

  • flock 锁文件

PreviouslearnNextnginx

Last updated 2 years ago