Skip to content

Instantly share code, notes, and snippets.

@Nyahua
Last active October 23, 2018 13:20
Show Gist options
  • Save Nyahua/52b2b8f8b487cbd11ea7d2877c55fed6 to your computer and use it in GitHub Desktop.
Save Nyahua/52b2b8f8b487cbd11ea7d2877c55fed6 to your computer and use it in GitHub Desktop.
ubuntu tips

run a python program in background

nohup $python program.py &

disable ssh timeout

  • first: sudo nano /etc/ssh/sshd_config

  • add the following lines:

TCPKeepAlive no
ClientAliveInterval 30
ClientAliveCountMax 100
  • last: sudo service sshd restart

compress file or directory

tar -czvf name-of-archive.tar.gz /path/to/directory-or-file

ssh to remote server

ssh user@192.168.1.1 -p 26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment