🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

default-shell

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

default-shell

Get the user's default shell

latest
Source
npmnpm
Version
2.2.0
Version published
Weekly downloads
203K
-17.73%
Maintainers
1
Weekly downloads
 
Created
Source

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'

Keywords

default

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