[算法工程师之]Linux常用指令记录

来源:互联网 发布:淘宝代运营是诈骗吗 编辑:程序博客网 时间:2024/06/05 06:36
  • Three ways to move to the home directory

    • cd (当然敲这个最省力)
    • cd ~
    • cd $HOME
  • Move to where you just came from

    • cd - (实用的指令)
  • Run something in background mode
    (When you run a command in the linux terminal, the command will take control of this terminal until it finishes executing.)

    • command & (Use & after the command, you can get the prompt back and use this terminal. But after you close this terminal, also these running jobs will be closed.)
    • nohup command & (Plus nohup, the running jobs will not be killed after you close the terminal)
    • Ctrl-Z (Stop the running process in the terminal)
    • bg %\$number (Put the $number-th job into background)
    • fg %\$number (Pull the $number-th job back to the foreground)
    • jobs -l (Check running jobs)
    • ps -ef | grep \$command (Check the process number of the $command)
    • kill \$number (Kill the $number-th process)
    • click here for more details
  • more 指令
    单页显示

  • 环境变量

    • printenv [name]
    • echo $[name]
    • export [name]=$PATH1:$PATH2
0 0
原创粉丝点击