When I run nohup google-chrome & in i3 terminal it will start a new terminal with google-chrome.But if I close the terminal where I ran the nohup command then the google-chrome terminal will also close.How can I start the google-chrome independently?
nohup cmd & in i3
nohup;i3
use google-chrome &! to detach it from controlling shell, so exiting the shell won't kill leftover jobs. Alternatively, use disown shell builtin to detach the job. Note that it will work in zsh and bash shells, not all of them (but dash for example won't kill remaining backgrounded jobs in the first place)More portable (if awkward) way may be sh -c google-chrome & &. That would start a subshell in background, which would start google-chrome in background and terminate - thus leaving no dangling jobs in original shell to kill.