---
title: "Run command then close the terminal(Linux)"
author: "roddy"
date: "2016-08-03T14:57:39Z"
tags: []
categories: ["操作系统"]
slug: "run-command-then-close-the-terminal-linux"
draft: false
lastmod: "2016-08-03T14:57:39Z"
id: 2315234
url: "https://roddy.iteye.com/blog/2315234"
---

Depending on what you are wanting, just add a & to the end of the command

```
script.sh &
command &
```

If you are running it in a terminal, and you want to then close the terminal, use nohup or disown

nohup

```
nohup script.sh &
```

disown

```
script &
disown
```