Skip to content

Instantly share code, notes, and snippets.

@zzzhc
Last active December 9, 2015 19:18
Show Gist options
  • Save zzzhc/4316068 to your computer and use it in GitHub Desktop.
Save zzzhc/4316068 to your computer and use it in GitHub Desktop.

FS

  • fhs

    / : Root directory

    /bin : Essential user command binaries (for use by all users)

    /sbin : Essential system binaries

    /dev : Devices and special files

    /dev/null
    
    /dev/zero
    

    /etc : Host-specific system configuration

    /lib, /lib64 and /lib32 : 64/32-bit libraries (architecture dependent)

    /proc : Kernel and process information virtual filesystem

    /usr/bin : Most user commands

    /usr/sbin : Non-essential standard system binaries

    /usr/include : Header files included by C programs

    /usr/lib : Libraries for programming and packages

    /usr/src : Source code

    /opt : Add-on application software packages

    /var/spool/cron : cron and at jobs

    /var/log : Log files and directories

    /root : Home directory for the root user

    /tmp : Temporary files

  • pwd

  • ls

  • cat

  • cd

  • mkdir

  • touch

  • ln

  • echo

  • chmod

  • chown

  • rm

  • cp

  • mv

  • file

  • find

  • df -h

  • du

  • tar

  • gzip/gunzip

pipeline

  • cmd1 | cmd2 |cmd3
  • xargs

text processing

  • grep/ack
  • sed
  • awk
  • sort
  • uniq
  • head
  • tail
  • cut
  • paste
  • tr
$ echo 'abc' |tr 'a-z' 'A-Z'
  • strings
  • iconv

process

  • ps
  • kill
  • top

memory

  • vmstat
  • free

IO

  • iostat
  • dstat
  • ifconfig
  • netstat

ssh

  • ssh-keygen
  • ssh ** port forward
  • scp

sys

  • uname -a
  • ulimit -a
  • cat /proc/cpuinfo
  • cat /proc/meminfo

powerful tools

  • lsof
  • strace
  • tcpdump
  • nc/socat
  • curl/wget
  • rsync

misc

  • alias/unalias \cmd
  • export
  • su
  • type
  • which

man

$ man man

refs

http://linuxcommand.org/

@du-song
Copy link

du-song commented Dec 17, 2012

/lib64 and /lib32 are not so widely used, but /lib is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment