Linux TIPS collect (神奇的知识集合)

  1. http_proxy environment in sudo command: http_proxy=xxx:xxx sudo yourcommand doesn't work, you should sudo http_proxy=xxx:yyy yourcommand instead.
  2. ssh running local script: ssh [email protected] 'bash -s' < your.local.script.sh
  3. ssh running local script with paraemters: ssh [email protected] < your.local.script.sh 'bash -s' yourparam1 yourparam2 doesn't work, you should runssh [email protected] < your.local.script.sh 'bash -s' -- yourparam1 yourparam2