0

我正在运行这个命令:

nohup google-chrome > /dev/null 2>&1 &

运行它后,我得到以下输出:

[1] 16975

无论如何我可以运行该命令并且根本没有输出?

提前致谢!

4

1 回答 1

0

您可以&>像这样使用重定向 stdout 和 stderr :

nohup google-chrome &> /dev/null &

要隐藏 pid,请使用子 shell:

(nohup google-chrome & ) &> /dev/null 
于 2019-11-10T18:55:35.187 回答