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

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.2.0
    3,227
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.2.0
    3,227
  • 2.1.0
    0
  • 2.0.0
    0
  • 1.0.1
    45,148
  • 1.0.0
    0

Package Sidebar

Install

npm i default-shell

Weekly Downloads

48,375

Version

2.2.0

License

MIT

Unpacked Size

3.53 kB

Total Files

5

Last publish

Collaborators

  • sindresorhus