bitburner-src/markdown/bitburner.ns.kill.md
2023-02-13 21:50:38 -05:00

41 lines
812 B
Markdown

<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [NS](./bitburner.ns.md) &gt; [kill](./bitburner.ns.kill.md)
## NS.kill() method
Terminate the script with the provided PID.
**Signature:**
```typescript
kill(pid: number): boolean;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| pid | number | The PID of the script to kill. |
**Returns:**
boolean
True if the script is successfully killed, and false otherwise.
## Remarks
RAM cost: 0.5 GB
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)<!-- -->.
## Example
```js
// kills the script with PID 20:
ns.kill(20);
```