Skip to content

Instantly share code, notes, and snippets.

@macrotea
Created May 10, 2014 10:18
Show Gist options
  • Save macrotea/75b34d02f9141b4bceae to your computer and use it in GitHub Desktop.
Save macrotea/75b34d02f9141b4bceae to your computer and use it in GitHub Desktop.
shell command in practice and record for macrotea.cn/tevi video

change the password of macrotea

  • sudo passwd macrotea

list files

  • ls
  • ls --help
  • ls -a
  • ls -al

clear the terminal

  • clear

hotkey for manage the shell terminal

  • ctrl + f : move front one char
  • ctrl + b : move back one char
  • ctrl + e : move end of current line
  • ctrl + d : delete current char
  • alt + u : upper the chars
  • alt + l : lower the chars
  • ctrl + k : cut off to end
  • ctrl + u : cut off to start
  • ctrl + y : paste your cut content

show me the command history

  • history
  • history 5

alias your command

  • alias ls='ls --color=auto -l'
  • alias cls='clear'

show current path

  • pwd

show env vars

  • env
  • echo $PWD
  • echo $PATH

where is my command

  • whereis ls
@macrotea
Copy link
Author

ok,thanks for your reading,bye

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