2022-10-21 17:16:00 +02:00
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home ](./index.md ) > [bitburner ](./bitburner.md ) > [NS ](./bitburner.ns.md ) > [kill ](./bitburner.ns.kill_1.md )
## NS.kill() method
Terminate another script.
< b > Signature:< / b >
```typescript
kill(script: string, host: string, ...args: (string | number | boolean)[]): boolean;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
2022-11-20 18:07:22 +01:00
| script | string | Filename or PID of the script to kill. |
2022-10-21 17:16:00 +02:00
| host | string | Hostname of the server on which to kill the script. |
| args | (string \| number \| boolean)\[\] | Arguments to identify which script to kill. |
< b > Returns:< / b >
boolean
True if the script is successfully killed, and false otherwise.
## Remarks
RAM cost: 0.5 GB
2022-11-20 18:07:22 +01:00
Kills the script on the target server specified by the script’ s name and arguments. Remember that scripts are uniquely identified by both their names and arguments. For example, if `foo.script` is run with the argument 1, then this is not the same as `foo.script` run with the argument 2, even though they have the same name.
2022-10-21 17:16:00 +02:00
## Example 1
```ts
// NS1:
//The following example will try to kill a script named foo.script on the foodnstuff server that was ran with no arguments:
kill("foo.script", "foodnstuff");
//The following will try to kill a script named foo.script on the current server that was ran with no arguments:
kill("foo.script", getHostname());
//The following will try to kill a script named foo.script on the current server that was ran with the arguments 1 and “foodnstuff”:
kill("foo.script", getHostname(), 1, "foodnstuff");
```
## Example 2
```ts
// NS2:
//The following example will try to kill a script named foo.script on the foodnstuff server that was ran with no arguments:
ns.kill("foo.script", "foodnstuff");
//The following will try to kill a script named foo.script on the current server that was ran with no arguments:
ns.kill("foo.script", getHostname());
//The following will try to kill a script named foo.script on the current server that was ran with the arguments 1 and “foodnstuff”:
ns.kill("foo.script", getHostname(), 1, "foodnstuff");
```