{"id":33916,"date":"2025-11-08T20:41:32","date_gmt":"2025-11-08T17:41:32","guid":{"rendered":"https:\/\/fatihsoysal.com\/blog\/?p=33916"},"modified":"2025-11-08T20:41:32","modified_gmt":"2025-11-08T17:41:32","slug":"nohup-nedir-ve-neden-kullanilir","status":"publish","type":"post","link":"https:\/\/fatihsoysal.com\/blog\/nohup-nedir-ve-neden-kullanilir\/","title":{"rendered":"nohup Nedir ve Neden Kullan\u0131l\u0131r?"},"content":{"rendered":"<p><body><\/p>\n<p>Linux sistemlerinde uzun s\u00fcreli i\u015flemler \u00e7al\u0131\u015ft\u0131r\u0131rken veya terminal oturumunuzu kapatt\u0131\u011f\u0131n\u0131zda bile belirli bir komutun \u00e7al\u0131\u015fmaya devam etmesini istedi\u011finizde kar\u015f\u0131la\u015f\u0131lan yayg\u0131n bir sorun vard\u0131r: terminal kapand\u0131\u011f\u0131nda veya ba\u011flant\u0131 kesildi\u011finde, o terminalde ba\u015flat\u0131lan t\u00fcm s\u00fcre\u00e7ler genellikle sonlan\u0131r. \u0130\u015fte bu noktada <code>nohup<\/code> komutu devreye girer. Bu rehberde, <code>nohup<\/code>&#8216;un ne oldu\u011funu, nas\u0131l \u00e7al\u0131\u015ft\u0131\u011f\u0131n\u0131 ve Linux ortam\u0131nda uzun soluklu g\u00f6revlerinizi kesintisiz bir \u015fekilde nas\u0131l y\u00f6netece\u011finizi ayr\u0131nt\u0131l\u0131 olarak inceleyece\u011fiz.<\/p>\n<p>Linux sistem y\u00f6neticileri, geli\u015ftiriciler ve hatta g\u00fcnl\u00fck kullan\u0131c\u0131lar i\u00e7in <code>nohup<\/code>, arka planda g\u00fcvenilir bir \u015fekilde i\u015flem y\u00fcr\u00fctmenin temel ara\u00e7lar\u0131ndan biridir. Bu komut, \u00f6zellikle SSH ba\u011flant\u0131s\u0131 \u00fczerinden bir sunucuda \u00e7al\u0131\u015f\u0131rken ve ba\u011flant\u0131n\u0131z\u0131n kesilmesi durumunda i\u015finizin yar\u0131da kalmamas\u0131n\u0131 istedi\u011finiz durumlarda paha bi\u00e7ilmezdir.<\/p>\n<h2>nohup Nedir ve Neden Kullan\u0131l\u0131r?<\/h2>\n<p><code>nohup<\/code> (no hang up) kelimesinin k\u0131saltmas\u0131d\u0131r ve ad\u0131ndan da anla\u015f\u0131laca\u011f\u0131 gibi &#8220;kapanma&#8221; veya &#8220;ba\u011flant\u0131 kesilmesi&#8221; sinyalini (SIGHUP) yok saymak i\u00e7in tasarlanm\u0131\u015ft\u0131r. Linux ve Unix benzeri i\u015fletim sistemlerinde, bir terminal oturumu kapat\u0131ld\u0131\u011f\u0131nda veya bir SSH ba\u011flant\u0131s\u0131 kesildi\u011finde, i\u015fletim sistemi genellikle bu terminalde ba\u015flat\u0131lan t\u00fcm alt s\u00fcre\u00e7lere bir SIGHUP sinyali g\u00f6nderir. Bu sinyal, varsay\u0131lan olarak s\u00fcre\u00e7lerin sonland\u0131r\u0131lmas\u0131na neden olur.<\/p>\n<p><code>nohup<\/code> komutu, \u00e7al\u0131\u015ft\u0131rd\u0131\u011f\u0131n\u0131z komutun bu SIGHUP sinyalini almas\u0131n\u0131 engeller. B\u00f6ylece, terminal oturumunuzu kapatsan\u0131z veya a\u011f ba\u011flant\u0131n\u0131z kopsa bile, <code>nohup<\/code> ile ba\u015flat\u0131lan s\u00fcre\u00e7 arka planda \u00e7al\u0131\u015fmaya devam eder. Bu, \u00f6zellikle a\u015fa\u011f\u0131daki senaryolarda kritik bir \u00f6neme sahiptir:<\/p>\n<ul>\n<li>Uzun s\u00fcreli veri i\u015fleme veya analiz g\u00f6revleri<\/li>\n<li>Arka planda \u00e7al\u0131\u015fmas\u0131 gereken sunucu uygulamalar\u0131 veya servisler<\/li>\n<li>B\u00fcy\u00fck dosyalar\u0131n indirilmesi veya y\u00fcklenmesi<\/li>\n<li>Derleme veya kod olu\u015fturma i\u015flemleri<\/li>\n<\/ul>\n<p><code>nohup<\/code>&#8216;u kullanman\u0131n temel amac\u0131, bir s\u00fcrecin ya\u015fam d\u00f6ng\u00fcs\u00fcn\u00fc terminal oturumundan ba\u011f\u0131ms\u0131z hale getirmektir. Bu, sisteminizin kararl\u0131l\u0131\u011f\u0131n\u0131 art\u0131r\u0131r ve beklenmedik ba\u011flant\u0131 kesintileri nedeniyle i\u015f kayb\u0131n\u0131 \u00f6nler.<\/p>\n<h2>nohup Komutunun Temel Kullan\u0131m\u0131<\/h2>\n<p><code>nohup<\/code> komutunun temel s\u00f6zdizimi olduk\u00e7a basittir. Genellikle, \u00e7al\u0131\u015ft\u0131rmak istedi\u011finiz komutun \u00f6n\u00fcne <code>nohup<\/code> eklemeniz yeterlidir. Ayr\u0131ca, komutun arka planda \u00e7al\u0131\u015fmaya devam etmesini sa\u011flamak i\u00e7in sonuna <code>&<\/code> i\u015faretini eklemek yayg\u0131n bir uygulamad\u0131r. Aksi takdirde, komut hala \u00f6n planda \u00e7al\u0131\u015f\u0131r ve terminali me\u015fgul eder, ancak SIGHUP sinyalinden etkilenmez.<\/p>\n<h3>Temel S\u00f6zdizimi:<\/h3>\n<pre><code class=\"language-bash\">nohup komut [arg\u00fcmanlar] &<\/code><\/pre>\n<p><code>nohup<\/code> ile bir komut \u00e7al\u0131\u015ft\u0131rd\u0131\u011f\u0131n\u0131zda, komutun standart \u00e7\u0131kt\u0131s\u0131 (<code>stdout<\/code>) ve standart hatas\u0131 (<code>stderr<\/code>) varsay\u0131lan olarak bulundu\u011funuz dizinde <code>nohup.out<\/code> adl\u0131 bir dosyaya y\u00f6nlendirilir. E\u011fer bu dosya mevcut de\u011filse olu\u015fturulur, mevcutsa \u00e7\u0131kt\u0131lar sonuna eklenir.<\/p>\n<h3>\u00d6rnek 1: Basit Bir Komutu Arka Planda \u00c7al\u0131\u015ft\u0131rma<\/h3>\n<p>Diyelim ki 60 saniye boyunca uyuyacak basit bir komut \u00e7al\u0131\u015ft\u0131r\u0131yoruz:<\/p>\n<pre><code class=\"language-bash\">nohup sleep 60 &<\/code><\/pre>\n<p>Bu komutu \u00e7al\u0131\u015ft\u0131rd\u0131\u011f\u0131n\u0131zda, terminal size genellikle s\u00fcrecin PID&#8217;sini (Process ID) ve standart \u00e7\u0131kt\u0131n\u0131n <code>nohup.out<\/code> dosyas\u0131na y\u00f6nlendirildi\u011fini bildiren bir mesaj g\u00f6sterecektir:<\/p>\n<pre><code class=\"language-bash\">[1] 12345\nnohup: ignoring input and appending output to 'nohup.out'<\/code><\/pre>\n<p>Burada <code>12345<\/code>, <code>sleep<\/code> komutunun PID&#8217;sidir. Art\u0131k terminali kapatabilir veya SSH ba\u011flant\u0131s\u0131n\u0131 kesebilirsiniz; <code>sleep 60<\/code> komutu arka planda \u00e7al\u0131\u015fmaya devam edecektir.<\/p>\n<h3>\u00d6rnek 2: Bir Beti\u011fi \u00c7al\u0131\u015ft\u0131rma<\/h3>\n<p>Bir beti\u011fi (\u00f6rne\u011fin, <code>uzun_islem.sh<\/code>) <code>nohup<\/code> ile \u00e7al\u0131\u015ft\u0131rmak da benzerdir:<\/p>\n<pre><code class=\"language-bash\">nohup .\/uzun_islem.sh &<\/code><\/pre>\n<p>Bu durumda, <code>uzun_islem.sh<\/code> beti\u011finin t\u00fcm \u00e7\u0131kt\u0131lar\u0131 (e\u011fer y\u00f6nlendirilmezse) <code>nohup.out<\/code> dosyas\u0131na yaz\u0131lacakt\u0131r.<\/p>\n<h3>\u00c7al\u0131\u015fan S\u00fcre\u00e7leri Kontrol Etme<\/h3>\n<p><code>nohup<\/code> ile ba\u015flatt\u0131\u011f\u0131n\u0131z s\u00fcre\u00e7lerin hala \u00e7al\u0131\u015f\u0131p \u00e7al\u0131\u015fmad\u0131\u011f\u0131n\u0131 kontrol etmek i\u00e7in <code>ps<\/code> komutunu kullanabilirsiniz:<\/p>\n<pre><code class=\"language-bash\">ps aux | grep uzun_islem.sh<\/code><\/pre>\n<p>Veya e\u011fer PID&#8217;yi biliyorsan\u0131z:<\/p>\n<pre><code class=\"language-bash\">ps -p 12345<\/code><\/pre>\n<h3>nohup S\u00fcrecini Sonland\u0131rma<\/h3>\n<p>E\u011fer <code>nohup<\/code> ile ba\u015flatt\u0131\u011f\u0131n\u0131z bir s\u00fcreci durdurmak isterseniz, \u00f6ncelikle PID&#8217;sini bulman\u0131z gerekir (yukar\u0131daki <code>ps aux | grep<\/code> \u00f6rne\u011findeki gibi). Ard\u0131ndan <code>kill<\/code> komutunu kullanabilirsiniz:<\/p>\n<pre><code class=\"language-bash\">kill 12345<\/code><\/pre>\n<p>E\u011fer s\u00fcre\u00e7 sonlanmazsa, daha agresif bir sonland\u0131rma sinyali olan <code>-9<\/code> ile tekrar deneyebilirsiniz:<\/p>\n<pre><code class=\"language-bash\">kill -9 12345<\/code><\/pre>\n<h2>\u00c7\u0131kt\u0131 Y\u00f6nlendirme ve Geli\u015fmi\u015f Kullan\u0131m<\/h2>\n<p><code>nohup<\/code>&#8216;un varsay\u0131lan olarak \u00e7\u0131kt\u0131y\u0131 <code>nohup.out<\/code> dosyas\u0131na y\u00f6nlendirmesi genellikle yeterli olsa da, bazen \u00e7\u0131kt\u0131y\u0131 belirli bir dosyaya y\u00f6nlendirmek veya standart hatay\u0131 (stderr) ayr\u0131 olarak ele almak isteyebilirsiniz. Bu, hata ay\u0131klama ve g\u00fcnl\u00fck kayd\u0131 i\u00e7in olduk\u00e7a kullan\u0131\u015fl\u0131d\u0131r.<\/p>\n<h3>\u00d6zel Bir Dosyaya \u00c7\u0131kt\u0131 Y\u00f6nlendirme<\/h3>\n<p>Standart \u00e7\u0131kt\u0131y\u0131 (<code>stdout<\/code>) belirli bir dosyaya y\u00f6nlendirmek i\u00e7in <code>><\/code> operat\u00f6r\u00fcn\u00fc kullan\u0131r\u0131z:<\/p>\n<pre><code class=\"language-bash\">nohup .\/my_script.sh > script_output.log &<\/code><\/pre>\n<p>Bu komut, <code>my_script.sh<\/code>&#8216;nin t\u00fcm standart \u00e7\u0131kt\u0131lar\u0131n\u0131 <code>script_output.log<\/code> dosyas\u0131na yazacakt\u0131r. <code>nohup.out<\/code> dosyas\u0131 bu durumda olu\u015fturulmayacakt\u0131r (\u00e7\u00fcnk\u00fc <code>stdout<\/code> ba\u015fka bir yere y\u00f6nlendirildi).<\/p>\n<h3>Standart \u00c7\u0131kt\u0131 ve Standart Hatay\u0131 Ayn\u0131 Dosyaya Y\u00f6nlendirme<\/h3>\n<p>Genellikle hem standart \u00e7\u0131kt\u0131y\u0131 hem de standart hatay\u0131 ayn\u0131 dosyaya y\u00f6nlendirmek istenir. Bu, <code>2>&1<\/code> operat\u00f6r\u00fc ile yap\u0131l\u0131r:<\/p>\n<pre><code class=\"language-bash\">nohup .\/my_script.sh > script_output.log 2>&1 &<\/code><\/pre>\n<p>Burada:<\/p>\n<ul>\n<li><code>> script_output.log<\/code>: Standart \u00e7\u0131kt\u0131y\u0131 (dosya tan\u0131mlay\u0131c\u0131 1) <code>script_output.log<\/code> dosyas\u0131na y\u00f6nlendirir.<\/li>\n<li><code>2>&1<\/code>: Standart hatay\u0131 (dosya tan\u0131mlay\u0131c\u0131 2) standart \u00e7\u0131kt\u0131n\u0131n (dosya tan\u0131mlay\u0131c\u0131 1) y\u00f6nlendirildi\u011fi yere (yani <code>script_output.log<\/code>&#8216;a) y\u00f6nlendirir.<\/li>\n<\/ul>\n<p>Bu, <code>nohup<\/code> ile uzun s\u00fcreli i\u015flemler \u00e7al\u0131\u015ft\u0131r\u0131rken en s\u0131k kullan\u0131lan ve \u00f6nerilen y\u00f6ntemdir, \u00e7\u00fcnk\u00fc hem ba\u015far\u0131l\u0131 \u00e7\u0131kt\u0131lar\u0131 hem de olas\u0131 hatalar\u0131 tek bir yerde toplar.<\/p>\n<h3>Girdiyi \/dev\/null&#8217;dan Okuma<\/h3>\n<p>Baz\u0131 komutlar, terminalden girdi bekleyebilir. <code>nohup<\/code> ile bir komutu arka planda \u00e7al\u0131\u015ft\u0131r\u0131rken, komutun girdi beklemesi durumunda donmas\u0131n\u0131 veya hata vermesini \u00f6nlemek i\u00e7in standart girdiyi (<code>stdin<\/code>) <code>\/dev\/null<\/code>&#8216;dan okumak iyi bir pratiktir:<\/p>\n<pre><code class=\"language-bash\">nohup .\/my_script.sh < \/dev\/null > script_output.log 2>&1 &<\/code><\/pre>\n<p><code>< \/dev\/null<\/code> ifadesi, komutun herhangi bir girdi bekledi\u011finde bo\u015f bir kaynaktan okumas\u0131n\u0131 sa\u011flar ve b\u00f6ylece s\u00fcrecin terminal ba\u011flant\u0131s\u0131 olmadan tak\u0131lmas\u0131n\u0131 engeller.<\/p>\n<h3>Daha Geli\u015fmi\u015f Alternatifler: screen ve tmux<\/h3>\n<p><code>nohup<\/code>, basit ve etkili bir \u00e7\u00f6z\u00fcm olsa da, terminal oturumu y\u00f6netiminde daha fazla esneklik ve \u00f6zellik sunan <code>screen<\/code> ve <code>tmux<\/code> gibi ara\u00e7lar da bulunmaktad\u0131r. Bu ara\u00e7lar, birden fazla terminal oturumu olu\u015fturman\u0131za, bunlar aras\u0131nda ge\u00e7i\u015f yapman\u0131za ve hatta mevcut bir oturuma daha sonra yeniden ba\u011flanman\u0131za olanak tan\u0131r. E\u011fer <code>nohup<\/code>'un \u00f6tesinde bir \u015feye ihtiyac\u0131n\u0131z varsa, bu ara\u00e7lar\u0131 ara\u015ft\u0131rman\u0131z faydal\u0131 olacakt\u0131r. Ancak, basit bir komutun terminalden ba\u011f\u0131ms\u0131z \u00e7al\u0131\u015fmas\u0131n\u0131 sa\u011flamak i\u00e7in <code>nohup<\/code> genellikle en h\u0131zl\u0131 ve en kolay \u00e7\u00f6z\u00fcmd\u00fcr.<\/p>\n<h2>Pratik Senaryolar ve \u0130pu\u00e7lar\u0131<\/h2>\n<p><code>nohup<\/code> komutunu g\u00fcnl\u00fck Linux kullan\u0131m\u0131n\u0131zda nas\u0131l uygulayabilece\u011finize dair baz\u0131 pratik senaryolar ve ipu\u00e7lar\u0131:<\/p>\n<h3>1. Arka Planda Bir Web Sunucusu \u00c7al\u0131\u015ft\u0131rma<\/h3>\n<p>Bir geli\u015ftirme web sunucusunu (\u00f6rne\u011fin, Python'\u0131n basit HTTP sunucusunu) arka planda \u00e7al\u0131\u015ft\u0131rmak isteyebilirsiniz:<\/p>\n<pre><code class=\"language-bash\">nohup python3 -m http.server 8000 > webserver.log 2>&1 &<\/code><\/pre>\n<p>Bu komut, 8000 portunda bir HTTP sunucusu ba\u015flat\u0131r ve t\u00fcm \u00e7\u0131kt\u0131lar\u0131 <code>webserver.log<\/code> dosyas\u0131na y\u00f6nlendirir. Terminali kapatt\u0131ktan sonra bile sunucu \u00e7al\u0131\u015fmaya devam edecektir.<\/p>\n<h3>2. Uzun S\u00fcreli Veritaban\u0131 Yedekleme<\/h3>\n<p>B\u00fcy\u00fck bir veritaban\u0131n\u0131n yede\u011fini almak uzun s\u00fcrebilir. Bu i\u015flemi <code>nohup<\/code> ile ba\u015flatmak, ba\u011flant\u0131 sorunlar\u0131 nedeniyle yede\u011fin yar\u0131da kalmas\u0131n\u0131 engeller:<\/p>\n<pre><code class=\"language-bash\">nohup mysqldump -u root -p mydatabase > mydatabase_backup.sql 2>&1 &<\/code><\/pre>\n<p>\u015eifrenizi girdikten sonra i\u015flem arka planda \u00e7al\u0131\u015fmaya ba\u015flayacakt\u0131r.<\/p>\n<h3>3. Bir Uygulama Derleme<\/h3>\n<p>B\u00fcy\u00fck bir yaz\u0131l\u0131m projesini derlemek bazen saatler s\u00fcrebilir. Derleme i\u015flemini <code>nohup<\/code> ile ba\u015flatmak, terminal oturumunuzun kapanmas\u0131 durumunda derlemenin ba\u015far\u0131s\u0131z olmamas\u0131n\u0131 sa\u011flar:<\/p>\n<pre><code class=\"language-bash\">nohup make all > compile.log 2>&1 &<\/code><\/pre>\n<h3>\u0130pu\u00e7lar\u0131:<\/h3>\n<ul>\n<li><strong>\u00c7\u0131kt\u0131lar\u0131 Kontrol Edin:<\/strong> <code>nohup<\/code> ile ba\u015flatt\u0131\u011f\u0131n\u0131z bir s\u00fcrecin \u00e7\u0131kt\u0131s\u0131n\u0131 takip etmek i\u00e7in <code>tail -f script_output.log<\/code> komutunu kullanabilirsiniz. Bu, dosyan\u0131n sonuna eklenen yeni sat\u0131rlar\u0131 ger\u00e7ek zamanl\u0131 olarak g\u00f6sterir.<\/li>\n<li><strong>Ge\u00e7erli Dizin:<\/strong> <code>nohup.out<\/code> dosyas\u0131, komutu \u00e7al\u0131\u015ft\u0131rd\u0131\u011f\u0131n\u0131z dizinde olu\u015fturulur. E\u011fer bu dizine yazma izniniz yoksa, <code>nohup<\/code> hata verebilir. Bu durumda, \u00e7\u0131kt\u0131y\u0131 yazma izninizin oldu\u011fu bir dizine y\u00f6nlendirin (\u00f6rne\u011fin, <code>\/tmp\/output.log<\/code>).<\/li>\n<li><strong>PID'yi Kaydetme:<\/strong> Baz\u0131 durumlarda, bir s\u00fcrecin PID'sini otomatik olarak bir dosyaya kaydetmek isteyebilirsiniz. Bunu <code>echo $! > process.pid<\/code> komutuyla, <code>nohup<\/code> komutundan hemen sonra yapabilirsiniz. <code>$!<\/code>, en son arka planda ba\u015flat\u0131lan s\u00fcrecin PID'sini i\u00e7erir.<\/li>\n<pre><code class=\"language-bash\">nohup .\/my_script.sh > script_output.log 2>&1 &\necho $! > my_script.pid<\/code><\/pre>\n<li><strong>G\u00fcvenlik ve Performans:<\/strong> <code>nohup<\/code>, bir s\u00fcrecin g\u00fcvenlik veya performans\u0131n\u0131 do\u011frudan etkilemez. Sadece terminalden ba\u011f\u0131ms\u0131zl\u0131\u011f\u0131n\u0131 sa\u011flar. S\u00fcrecin kendisi hala sistem kaynaklar\u0131n\u0131 kullan\u0131r.<\/li>\n<\/ul>\n<h2>Sonu\u00e7 ve S\u0131k\u00e7a Sorulan Sorular<\/h2>\n<p><code>nohup<\/code> komutu, Linux'ta uzun soluklu veya terminalden ba\u011f\u0131ms\u0131z \u00e7al\u0131\u015fmas\u0131 gereken s\u00fcre\u00e7leri y\u00f6netmek i\u00e7in basit ama g\u00fc\u00e7l\u00fc bir ara\u00e7t\u0131r. SIGHUP sinyalini yok sayarak, terminal oturumu kapansa bile i\u015flemlerinizin kesintisiz devam etmesini sa\u011flar. Bu rehberde, <code>nohup<\/code>'un temel ve geli\u015fmi\u015f kullan\u0131mlar\u0131n\u0131, \u00e7\u0131kt\u0131 y\u00f6nlendirme tekniklerini ve pratik senaryolar\u0131n\u0131 ele ald\u0131k. Unutmay\u0131n ki, daha karma\u015f\u0131k terminal oturumu y\u00f6netimi ve \u00e7oklu oturum ihtiya\u00e7lar\u0131 i\u00e7in <code>screen<\/code> veya <code>tmux<\/code> gibi ara\u00e7lar daha uygun olabilir, ancak basit arka plan i\u015flemleri i\u00e7in <code>nohup<\/code> her zaman h\u0131zl\u0131 ve g\u00fcvenilir bir se\u00e7enektir.<\/p>\n<h3>S\u0131k\u00e7a Sorulan Sorular (SSS)<\/h3>\n<h3>H3 nohup ile & aras\u0131ndaki fark nedir?<\/h3>\n<p><code>&<\/code> i\u015fareti, bir komutu arka planda (background) \u00e7al\u0131\u015ft\u0131rman\u0131z\u0131 sa\u011flar, yani terminali serbest b\u0131rak\u0131r ve ba\u015fka komutlar girmenize olanak tan\u0131r. Ancak, terminal oturumu kapand\u0131\u011f\u0131nda veya SSH ba\u011flant\u0131s\u0131 kesildi\u011finde, <code>&<\/code> ile ba\u015flat\u0131lan s\u00fcre\u00e7lere SIGHUP sinyali g\u00f6nderilir ve varsay\u0131lan olarak bu s\u00fcre\u00e7ler sonlan\u0131r. <code>nohup<\/code> ise, komutun SIGHUP sinyalini yok saymas\u0131n\u0131 sa\u011flar. Dolay\u0131s\u0131yla, <code>nohup<\/code> olmadan <code>&<\/code> kullanmak, komutun terminal kapand\u0131\u011f\u0131nda sonlanmas\u0131n\u0131 engellemez. G\u00fcvenli arka plan \u00e7al\u0131\u015ft\u0131rma i\u00e7in genellikle <code>nohup komut &<\/code> \u015feklinde ikisi birlikte kullan\u0131l\u0131r.<\/p>\n<h3>H3 nohup.out dosyas\u0131 nereye kaydedilir?<\/h3>\n<p><code>nohup.out<\/code> dosyas\u0131, <code>nohup<\/code> komutunu \u00e7al\u0131\u015ft\u0131rd\u0131\u011f\u0131n\u0131z dizine kaydedilir. E\u011fer o dizine yazma izniniz yoksa, dosya genellikle kullan\u0131c\u0131n\u0131n ana dizinine (<code>$HOME\/nohup.out<\/code>) kaydedilir. E\u011fer komutun \u00e7\u0131kt\u0131s\u0131n\u0131 belirli bir dosyaya y\u00f6nlendirirseniz (\u00f6rne\u011fin, <code>> my_log.log<\/code>), <code>nohup.out<\/code> dosyas\u0131 olu\u015fturulmaz.<\/p>\n<h3>H3 nohup ile ba\u015flat\u0131lan bir s\u00fcreci nas\u0131l durdururum?<\/h3>\n<p>Bir <code>nohup<\/code> s\u00fcrecini durdurmak i\u00e7in \u00f6ncelikle s\u00fcrecin PID'sini (Process ID) bulman\u0131z gerekir. Bunu <code>ps aux | grep \"komut_ad\u0131\"<\/code> veya <code>pgrep \"komut_ad\u0131\"<\/code> gibi komutlarla yapabilirsiniz. PID'yi bulduktan sonra, <code>kill PID<\/code> komutuyla s\u00fcreci sonland\u0131rabilirsiniz. E\u011fer s\u00fcre\u00e7 yan\u0131t vermezse, <code>kill -9 PID<\/code> ile zorla sonland\u0131rabilirsiniz.<\/p>\n<h3>H3 nohup yerine daha geli\u015fmi\u015f bir ara\u00e7 var m\u0131?<\/h3>\n<p>Evet, <code>screen<\/code> ve <code>tmux<\/code> gibi terminal multiplexer'lar, <code>nohup<\/code>'tan \u00e7ok daha geli\u015fmi\u015f \u00f6zellikler sunar. Bu ara\u00e7lar, birden fazla terminal oturumu olu\u015fturman\u0131za, bu oturumlar\u0131 ay\u0131rman\u0131za (detach) ve daha sonra yeniden ba\u011flanman\u0131za (attach) olanak tan\u0131r. B\u00f6ylece, terminal oturumunuzu kapatsan\u0131z bile, t\u00fcm sanal oturumlar\u0131n\u0131z ve i\u00e7lerindeki s\u00fcre\u00e7ler \u00e7al\u0131\u015fmaya devam eder. <code>nohup<\/code> tek bir komutu ba\u011f\u0131ms\u0131z hale getirirken, <code>screen<\/code>\/<code>tmux<\/code> t\u00fcm bir terminal ortam\u0131n\u0131 ba\u011f\u0131ms\u0131z hale getirir.<\/p>\n<h3>H3 Neden \u00e7\u0131kt\u0131y\u0131 \/dev\/null'a y\u00f6nlendirmeliyim?<\/h3>\n<p>Asl\u0131nda \u00e7\u0131kt\u0131y\u0131 <code>\/dev\/null<\/code>'a y\u00f6nlendirmek yerine, standart girdiyi (<code>stdin<\/code>) <code>\/dev\/null<\/code>'dan okumak (<code>< \/dev\/null<\/code>) daha yayg\u0131n ve iyi bir pratiktir. Bunun nedeni, baz\u0131 programlar\u0131n kullan\u0131c\u0131dan girdi bekleyebilmesidir. E\u011fer <code>nohup<\/code> ile arka planda \u00e7al\u0131\u015fan bir program girdi beklerse ve bu girdi terminalden sa\u011flanamazsa, program donabilir veya hata verebilir. <code>< \/dev\/null<\/code> kullanarak, program\u0131n bo\u015f bir kaynaktan girdi okumas\u0131n\u0131 sa\u011flars\u0131n\u0131z ve bu da program\u0131n terminal ba\u011flant\u0131s\u0131 olmadan sorunsuz \u00e7al\u0131\u015fmas\u0131na yard\u0131mc\u0131 olur.<\/p>\n<h3>H3 nohup ile ba\u015flat\u0131lan bir s\u00fcreci terminali kapatt\u0131ktan sonra tekrar g\u00f6rebilir miyim?<\/h3>\n<p>Evet, terminali kapatt\u0131ktan sonra bile <code>nohup<\/code> ile ba\u015flat\u0131lan bir s\u00fcreci <code>ps aux | grep \"komut_ad\u0131\"<\/code> gibi komutlarla g\u00f6rebilirsiniz. Ancak, bu s\u00fcre\u00e7 art\u0131k sizin terminal oturumunuzla ili\u015fkilendirilmemi\u015f bir \"zombi\" veya \"orphan\" s\u00fcre\u00e7 olarak \u00e7al\u0131\u015facakt\u0131r. <code>jobs<\/code> komutu sadece mevcut terminal oturumunuzla ili\u015fkilendirilmi\u015f arka plan s\u00fcre\u00e7lerini g\u00f6sterdi\u011finden, <code>nohup<\/code> ile ba\u015flat\u0131lm\u0131\u015f ve terminali kapat\u0131lm\u0131\u015f bir s\u00fcreci <code>jobs<\/code> ile g\u00f6remezsiniz.<\/p>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"Linux sistemlerinde uzun s\u00fcreli i\u015flemler \u00e7al\u0131\u015ft\u0131r\u0131rken veya terminal oturumunuzu kapatt\u0131\u011f\u0131n\u0131zda bile belirli bir komutun \u00e7al\u0131\u015fmaya dev","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_page_header_type":"","csco_page_load_nextpost":"","csco_page_subscribe_form":"","csco_page_contact_form":"","footnotes":""},"categories":[1],"tags":[],"class_list":{"0":"post-33916","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-genel","7":"cs-entry","8":"cs-video-wrap"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.5 (Yoast SEO v25.3.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>nohup Nedir ve Neden Kullan\u0131l\u0131r? - Kodlar\u0131n Gizemli D\u00fcnyas\u0131<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fatihsoysal.com\/blog\/nohup-nedir-ve-neden-kullanilir\/\" \/>\n<meta property=\"og:locale\" content=\"tr_TR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"nohup Nedir ve Neden Kullan\u0131l\u0131r?\" \/>\n<meta property=\"og:description\" content=\"Linux sistemlerinde uzun s\u00fcreli i\u015flemler \u00e7al\u0131\u015ft\u0131r\u0131rken veya terminal oturumunuzu kapatt\u0131\u011f\u0131n\u0131zda bile belirli bir komutun \u00e7al\u0131\u015fmaya dev\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fatihsoysal.com\/blog\/nohup-nedir-ve-neden-kullanilir\/\" \/>\n<meta property=\"og:site_name\" content=\"Kodlar\u0131n Gizemli D\u00fcnyas\u0131\" \/>\n<meta property=\"article:published_time\" content=\"2025-11-08T17:41:32+00:00\" \/>\n<meta name=\"author\" content=\"Fatih Soysal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Yazan:\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fatih Soysal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tahmini okuma s\u00fcresi\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 dakika\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/nohup-nedir-ve-neden-kullanilir\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/nohup-nedir-ve-neden-kullanilir\/\"},\"author\":{\"name\":\"Fatih Soysal\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"headline\":\"nohup Nedir ve Neden Kullan\u0131l\u0131r?\",\"datePublished\":\"2025-11-08T17:41:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/nohup-nedir-ve-neden-kullanilir\/\"},\"wordCount\":1943,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/nohup-nedir-ve-neden-kullanilir\/#respond\"]}],\"copyrightYear\":\"2025\",\"copyrightHolder\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/nohup-nedir-ve-neden-kullanilir\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/nohup-nedir-ve-neden-kullanilir\/\",\"name\":\"nohup Nedir ve Neden Kullan\u0131l\u0131r? - Kodlar\u0131n Gizemli D\u00fcnyas\u0131\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\"},\"datePublished\":\"2025-11-08T17:41:32+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/nohup-nedir-ve-neden-kullanilir\/#breadcrumb\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/nohup-nedir-ve-neden-kullanilir\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/nohup-nedir-ve-neden-kullanilir\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Anasayfa\",\"item\":\"https:\/\/fatihsoysal.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"nohup Nedir ve Neden Kullan\u0131l\u0131r?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/\",\"name\":\"Fatihsoysal.com\",\"description\":\"Blog - Yaz\u0131l\u0131m D\u00fcnyas\u0131 Tecr\u00fcbelerim\",\"publisher\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fatihsoysal.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"tr\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\",\"name\":\"Fatih Soysal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"tr\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png\",\"contentUrl\":\"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png\",\"width\":512,\"height\":512,\"caption\":\"Fatih Soysal\"},\"logo\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/\"},\"description\":\"Kullan\u0131m ve kodlama m\u00fckemmeliyetini odak alan uygulamalar olu\u015fturma deneyimine sahip, profesyonel olarak 15+ y\u0131l \u00fczeri deneyime sahip bir yaz\u0131l\u0131m m\u00fchendisi.\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/author\/fatihsoysal\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"nohup Nedir ve Neden Kullan\u0131l\u0131r? - Kodlar\u0131n Gizemli D\u00fcnyas\u0131","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fatihsoysal.com\/blog\/nohup-nedir-ve-neden-kullanilir\/","og_locale":"tr_TR","og_type":"article","og_title":"nohup Nedir ve Neden Kullan\u0131l\u0131r?","og_description":"Linux sistemlerinde uzun s\u00fcreli i\u015flemler \u00e7al\u0131\u015ft\u0131r\u0131rken veya terminal oturumunuzu kapatt\u0131\u011f\u0131n\u0131zda bile belirli bir komutun \u00e7al\u0131\u015fmaya dev","og_url":"https:\/\/fatihsoysal.com\/blog\/nohup-nedir-ve-neden-kullanilir\/","og_site_name":"Kodlar\u0131n Gizemli D\u00fcnyas\u0131","article_published_time":"2025-11-08T17:41:32+00:00","author":"Fatih Soysal","twitter_card":"summary_large_image","twitter_misc":{"Yazan:":"Fatih Soysal","Tahmini okuma s\u00fcresi":"11 dakika"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fatihsoysal.com\/blog\/nohup-nedir-ve-neden-kullanilir\/#article","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/nohup-nedir-ve-neden-kullanilir\/"},"author":{"name":"Fatih Soysal","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"headline":"nohup Nedir ve Neden Kullan\u0131l\u0131r?","datePublished":"2025-11-08T17:41:32+00:00","mainEntityOfPage":{"@id":"https:\/\/fatihsoysal.com\/blog\/nohup-nedir-ve-neden-kullanilir\/"},"wordCount":1943,"commentCount":0,"publisher":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"inLanguage":"tr","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fatihsoysal.com\/blog\/nohup-nedir-ve-neden-kullanilir\/#respond"]}],"copyrightYear":"2025","copyrightHolder":{"@id":"https:\/\/fatihsoysal.com\/blog\/#organization"}},{"@type":"WebPage","@id":"https:\/\/fatihsoysal.com\/blog\/nohup-nedir-ve-neden-kullanilir\/","url":"https:\/\/fatihsoysal.com\/blog\/nohup-nedir-ve-neden-kullanilir\/","name":"nohup Nedir ve Neden Kullan\u0131l\u0131r? - Kodlar\u0131n Gizemli D\u00fcnyas\u0131","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/#website"},"datePublished":"2025-11-08T17:41:32+00:00","breadcrumb":{"@id":"https:\/\/fatihsoysal.com\/blog\/nohup-nedir-ve-neden-kullanilir\/#breadcrumb"},"inLanguage":"tr","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fatihsoysal.com\/blog\/nohup-nedir-ve-neden-kullanilir\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/fatihsoysal.com\/blog\/nohup-nedir-ve-neden-kullanilir\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Anasayfa","item":"https:\/\/fatihsoysal.com\/blog\/"},{"@type":"ListItem","position":2,"name":"nohup Nedir ve Neden Kullan\u0131l\u0131r?"}]},{"@type":"WebSite","@id":"https:\/\/fatihsoysal.com\/blog\/#website","url":"https:\/\/fatihsoysal.com\/blog\/","name":"Fatihsoysal.com","description":"Blog - Yaz\u0131l\u0131m D\u00fcnyas\u0131 Tecr\u00fcbelerim","publisher":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fatihsoysal.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"tr"},{"@type":["Person","Organization"],"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1","name":"Fatih Soysal","image":{"@type":"ImageObject","inLanguage":"tr","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png","contentUrl":"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png","width":512,"height":512,"caption":"Fatih Soysal"},"logo":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/"},"description":"Kullan\u0131m ve kodlama m\u00fckemmeliyetini odak alan uygulamalar olu\u015fturma deneyimine sahip, profesyonel olarak 15+ y\u0131l \u00fczeri deneyime sahip bir yaz\u0131l\u0131m m\u00fchendisi.","url":"https:\/\/fatihsoysal.com\/blog\/author\/fatihsoysal\/"}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/33916","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/comments?post=33916"}],"version-history":[{"count":1,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/33916\/revisions"}],"predecessor-version":[{"id":33917,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/33916\/revisions\/33917"}],"wp:attachment":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/media?parent=33916"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/categories?post=33916"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/tags?post=33916"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}