Files
bitburner-src/markdown/bitburner.ns.nuke.md
T

44 lines
1.2 KiB
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; [nuke](./bitburner.ns.nuke.md)
## NS.nuke() method
Runs NUKE.exe on a server.
**Signature:**
```typescript
nuke(host: string): boolean;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| host | string | Hostname/IP of the target server. |
**Returns:**
boolean
True if the player runs the program successfully, and false otherwise.
## Remarks
RAM cost: 0.05 GB
Running NUKE.exe on a target server gives you root access which means you can execute scripts on said server. NUKE.exe must exist on your home computer.
Each server has a different number of required open ports. If that number is greater than 0, you have to open its ports before nuking it. You can check the requirement with [getServerNumPortsRequired](./bitburner.ns.getservernumportsrequired.md) or [getServer().numOpenPortsRequired](./bitburner.server.numopenportsrequired.md)<!-- -->.
Note that the server's required hacking level is not a requirement of nuking. You can nuke a server as long as you open enough ports, regardless of your hacking level.
## Example
```js
ns.nuke("foodnstuff");
```