Skip to content

Repository files navigation

default-shell

Get the user's default shell

Install

npm install default-shell

Usage

importdefaultShellfrom'default-shell';// macOSconsole.log(defaultShell);//=> '/bin/zsh'// Windowsconsole.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/zsh'

About

Get the user's default shell

Resources

Code of conduct

Contributing

Security policy

Stars

43 stars

Watchers

3 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages