Echoshell
  • Selfservice book
  • MacBook Setup
  • Linux SystemAdmin
    • Linux useful commands
    • Analyze tools
      • Hardware overview
      • Vmstat
      • Top
      • Sar
      • ltrace
      • strace
      • Netstat/SS
      • lsof
      • iostat
      • iotop
    • Performance Tuning
      • CPU
      • Momory
      • Disk/Storage
      • Network
      • Process
  • SRE vs DevOps
    • Ansible
    • Git
    • Jenkins
    • HashiCorp-Terraform
      • Terraform VS. CloudFormation
      • Main elements
        • Provider
        • State Storage and Locking
        • Backends
      • Basic Elements
        • Install
        • Resource
        • Data
        • Output
        • Locals
      • Commands
        • terraform plan
        • terraform apply
        • terraform import
    • HashiCorp-Vault
    • HashiCorp-Consul
    • CI/CD
      • GoCD
  • Automation/Script Language
    • Shell&Bash
      • Useful links
    • Python
      • 基础
        • py2 vs py3
        • 字符编码
        • 输入和输出
      • 数据类型Data Types
        • 字符串String
        • 列表List
        • 元组Tuple
        • 字典Dict
        • 集合Set
      • 函数Function
        • 定义函数
        • 函数参数
      • 函数式编程
        • 匿名函数lamba
        • map/reduce/filter
        • 闭包
        • 装饰器
      • 类Class
        • 类和实例
        • 继承和多态
        • 类方法和静态方法
        • 定制类和魔法方法
        • 元类-陌生的 metaclass
      • 高级特性
        • 迭代器iterator
        • 生成器generator
        • 上下文管理
      • 文件和目录
        • 读写文本文件
        • os 模块
      • 进程、线程和协程
        • 进程
        • 线程
        • ThreadLocal
        • 协程
      • 异常处理Exception
      • 正则表达式Regular-Expressions
        • re 模块
      • 标准模块
        • datetime
        • argparse
      • 第三方模块Three Parts
        • Click
        • JIRA
        • Email
        • Jenkins
      • 系统相关模块System modules
        • Subprocess
        • shutil
  • Learning notes from organization
  • IT Tech Team Leader/Senior System administrator
    • Helpdesk
    • Windows Servers
      • Radius Server
      • NFS
      • Munki
      • 802.1X
    • Networks
  • Personal views and ideas from my careen path
    • Team management
    • Career path change from IT to devops
Powered by GitBook
On this page

Was this helpful?

  1. Linux SystemAdmin

Linux useful commands

memory

free -m

sar -a 2 2 

ps -eo pid,cmd,%mem,%cpu --sort=-%mem | head

CPU

sar -u 3 3

ps -eo pid,cmd,%mem,%cpu --sort=-%cpu | head

top

process

ps -e --forest | grep sshd

lsof -p pid

disk and files

df -hP

du -h 

ls -i

ls -ltr

state file

fuser filename

lsof filename

network

ss -altp | grep

nestat -altp | grep

fuser -v -k -n tcp 80

lsof -i :80

dig 


nslookup


grep tcp/80 /etc/services




iptable

accounts and permission

w

last

id userid

chage -l userid
chage -M -1 userid

chmod 775 file

chmod -R 775 folder

chwon root. file


history

system

init 6 
reboot

shutdown -h +10
shutdown -r now

halt 
poweroff -f
df -pH

fdisk -l 


free -mh

sar -u 2 2 

sar -



cpu

lsof  -i 80

lsof -p pid



fuser  -v 


ps aux | grep httpd

ps -eo pid,com,%mem,%cpu 

ps -e —forest

top

ss -altp

ls -i 

ls -ltr
PreviousLinux SystemAdminNextAnalyze tools

Last updated 5 years ago

Was this helpful?