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.md )
## NS.kill() method
2023-02-14 03:50:38 +01:00
Terminate the script with the provided PID.
2022-10-21 17:16:00 +02:00
2023-02-11 19:18:50 +01:00
**Signature:**
2022-10-21 17:16:00 +02:00
```typescript
2023-02-14 03:50:38 +01:00
kill(pid: number): boolean;
2022-10-21 17:16:00 +02:00
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
2023-02-14 03:50:38 +01:00
| pid | number | The PID of the script to kill. |
2022-10-21 17:16:00 +02:00
2023-02-11 19:18:50 +01:00
**Returns:**
2022-10-21 17:16:00 +02:00
boolean
True if the script is successfully killed, and false otherwise.
## Remarks
RAM cost: 0.5 GB
2023-02-14 03:50:38 +01:00
Kills the script with the provided PID. To instead kill a script using its filename, hostname, and args, see [the other ns.kill entry ](./bitburner.ns.kill_1.md )<!-- --> .
2022-10-21 17:16:00 +02:00
2023-02-14 03:50:38 +01:00
## Example
2022-10-21 17:16:00 +02:00
2023-02-14 03:50:38 +01:00
```js
// kills the script with PID 20:
ns.kill(20);
2022-10-21 17:16:00 +02:00
```