Emacs Init: Change Default Shell (PowerShell)
- explicit-shell-file-name
-
variable.
A full path to the default shell started by the command
shell
sample init to set it to PowerShell
;; on windows, make pwsh the default shell ;; 2023-09-09 (setq explicit-shell-file-name (cond ((eq system-type 'windows-nt) (let ((xlist (list "~/AppData/Local/Microsoft/WindowsApps/pwsh.exe" "C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe" ))) (seq-some (lambda (x) (if (file-exists-p x) x nil)) xlist))) (t nil)))
Start PowerShell from Eshell
Alternatively, you can start PowerShell from eshell
- Alt+x
eshell
or Alt+xshell
- type
powershell
orpwsh
. (orbash
, if you have that installed)

