Difference between revisions of "Linux Commands"

From Hack Sphere Labs Wiki
Jump to: navigation, search
(Created page with "Sometimes I just cant remember what to type. ==Linux SSH Saved Cert Upload and Login== It is usually a bad idea to do this... ssh-keygen -t rsa ssh-copy-id -i ~/.ssh/id_rsa.p...")
 
Line 7: Line 7:
 
  ssh-copy-id -i ~/.ssh/id_rsa.pub '-p ***** webdawg@*.*.*.*'
 
  ssh-copy-id -i ~/.ssh/id_rsa.pub '-p ***** webdawg@*.*.*.*'
 
  alias torbox="ssh -p ***** webdawg@*.*.*.*"
 
  alias torbox="ssh -p ***** webdawg@*.*.*.*"
 +
 +
==bg==
 +
 +
*bg
 +
If you need to run a command in the background and do not have access to screen or a crontab then start the process and hit CTRL + Z.  The process will suspend.  You then need to use bg to resume the process.  It will stay in the background and keep moving.  The command accepts PIDS too.
 +
 +
If you have only ran/suspended one command then you do not need to specify a PID.
 +
mycommand > log.log
 +
CTRL + Z
 +
bg
 +
Your command is running.

Revision as of 21:33, 28 November 2011

Sometimes I just cant remember what to type.

Linux SSH Saved Cert Upload and Login

It is usually a bad idea to do this...

ssh-keygen -t rsa
ssh-copy-id -i ~/.ssh/id_rsa.pub '-p ***** webdawg@*.*.*.*'
alias torbox="ssh -p ***** webdawg@*.*.*.*"

bg

  • bg

If you need to run a command in the background and do not have access to screen or a crontab then start the process and hit CTRL + Z. The process will suspend. You then need to use bg to resume the process. It will stay in the background and keep moving. The command accepts PIDS too.

If you have only ran/suspended one command then you do not need to specify a PID.

mycommand > log.log

CTRL + Z

bg

Your command is running.