🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

default-shell

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

default-shell

Get the user's default shell

2.2.0
latest
Version published
Weekly downloads
83K
-8.37%
Maintainers
1
Weekly downloads
 
Created

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'

FAQs

Package last updated on 17 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts