Linux 关掉shell依然保留进程方法


刚开始是这样的,在后面加 &

$ ./ &



 $nohup ./ &
 $echo $$
 $ nohup ./ &
 [1] 29016
 $ ps -ef | grep test
 515 29710 21734 0 11:47 pts/12 00:00:00 /bin/sh ./
 515 29713 21734 0 11:47 pts/12 00:00:00 grep test
 $ setsid ./ &
 [1] 409
 $ ps -ef | grep test
 515 410 1 0 11:49 ? 00:00:00 /bin/sh ./
 515 413 21734 0 11:49 pts/12 00:00:00 grep test


yum install -y screen

ctrl+A 然后按D,screen会关闭

screen -ls

559 thoughts on “Linux 关掉shell依然保留进程方法”

  • Thank you for another informative blog. The place else may I am getting that kind of info written in such a perfect approach? I’ve a venture that I am just now operating on, and I’ve been on the glance out for such info.

  • Thanks for these guidelines. One thing I also believe is credit cards offering a 0 interest rate often attract consumers together with zero rate, instant endorsement and easy on the web balance transfers, but beware of the real factor that will probably void that 0 easy road annual percentage rate plus throw you out into the bad house rapid.

  • I have learned some important things as a result of your post. I’d personally also like to express that there may be situation in which you will obtain a loan and don’t need a co-signer such as a Federal government Student Aid Loan. In case you are getting credit through a conventional loan provider then you need to be able to have a co-signer ready to assist you. The lenders can base any decision on a few issues but the largest will be your credit worthiness. There are some loan providers that will also look at your work history and make up your mind based on that but in almost all cases it will be based on on your score.

  • Just desire to say your article is as surprising. The clarity in your post is just cool and i could assume you are an expert on this subject. Fine with your permission let me to grab your RSS feed to keep up to date with forthcoming post. Thanks a million and please carry on the rewarding work.

  • Yet another thing I would like to convey is that in lieu of trying to match all your online degree classes on days and nights that you finish work (considering that people are exhausted when they come home), try to receive most of your instructional classes on the saturdays and sundays and only 1 or 2 courses on weekdays, even if it means taking some time away from your weekend break. This is fantastic because on the weekends, you will be more rested as well as concentrated upon school work. Thx for the different tips I have realized from your blog site.

  • Aw, this was a very nice post. Finding the time and actual effort to make a good article… but what can I say… I hesitate a lot and never manage to get nearly anything done.


邮箱地址不会被公开。 必填项已用*标注

÷ 5 = 1