Linux Implement Django Error: nohup: ignoring input and appending output to ‘nohup.out’

1、 Deploying Django to remote Linux server

Using xshell to connect to Linux server through SSH, the normal startup command is

python3 runserver

However, after you close xshell, you won’t be able to access Django

Concept: if you are running a process and you feel that the process will not end when you exit the account, you can use the nohup command. This command can continue to run the corresponding process after you exit the account/close the terminal.)


nohup python3 runserver

An error will be reported

nohup: ignoring input and appending output to ‘nohup.out’

2、 Solutions

1. Why

Because using nohup will generate log files, which are written to nohup.out by default

2. Solution

Output the log of nohup to/dev/null, this directory will make all the information to it disappear automatically

nohup python3 runserver > /dev/null 2> /dev/null &

Similar Posts: