default-shell
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

default-shell

Get the user's default shell

Install

npm install default-shell

Usage

import defaultShell from 'default-shell';

// macOS
console.log(defaultShell);
//=> '/bin/bash'

// Windows
console.log(defaultShell);
//=> 'C:\\WINDOWS\\system32\\cmd.exe'

There is also a method that gets the correct default shell even if it changes at runtime:

import {detectDefaultShell} from 'default-shell';

console.log(detectDefaultShell());
//=> '/bin/bash'

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.2.020,328latest

Version History

VersionDownloads (Last 7 Days)Published
2.2.020,328
2.1.00
2.0.01
1.0.158,072
1.0.03

Package Sidebar

Install

npm i default-shell

Weekly Downloads

78,404

Version

2.2.0

License

MIT

Unpacked Size

3.53 kB

Total Files

5

Last publish

Collaborators

  • sindresorhus