Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

set alias in powershell

#For Windows PowerShell
set-alias -name <alias_name> -value <command>
#<alias_name> is the new alias name you want to set.
#<command> is the command you want to alias.
#NB: this is temporal and will not work when powershell is reboot.
#To make it permanent, add it to PowerShell Profile.ps1 file.
Comment

powershell alias

# On your profile.ps1 file
# if you don't have it yet, just run code $PROFILE to create and edit it (with vscode)

function NpmRunDev {  
  npm run dev
}

Set-Alias nrd NpmRunDev
Comment

create alias in powershell permanently

// create a profile.ps1 file to set aliases
notepad $((Split-Path $profile -Parent) + "profile.ps1")

// example aliases (opens notepad when you type `edit` in console)
Set-Alias edit notepad.exe

// example aliases (opens notepad when you type `edit` in console)
Set-Alias edit1 "C:Program FilesWindows NTAccessorieswordpad.exe"
Comment

set alias for directory in powershell

#For Windows PowerShell
function <alias_name> {cd "C:Users..."}
#We use `function` and not 
set-alias -name <new_alias> -value <command>
#because cmdlets(cd) don't work in set-alias -value.
#NB: this is temporal and will not work when powershell is rebooted.
#To make it permanent, add it to PowerShell Profile.ps1 file.
Comment

powershell alias setting

set-theme [some themes]
Comment

PREVIOUS NEXT
Code Example
Shell :: git reset one file 
Shell :: git revert commit but keep changes 
Shell :: increment variable bash 
Shell :: git reset soft head 
Shell :: docker compose current directory 
Shell :: how to trim log file linux 
Shell :: grepper with github 
Shell :: best audio visualiser for linux 
Shell :: how to install kvm on Ubuntu 22.04 
Shell :: `Cannot autolaunch D-Bus without X11 $DISPLAY` 
Shell :: install code ubuntu 
Shell :: how to download terminator in ubuntu 
Shell :: powershell make file 
Shell :: duplicate line intellij mac 
Shell :: docker remove all images windows 
Shell :: composer install global 
Shell :: dpkg: error processing archive /var/cache/apt/archives/atftpd_0.7.git20210915- 
Shell :: how to check jenkins version in ubuntu 
Shell :: clone using token github 
Shell :: change default shell fedora 
Shell :: my apache is not running ubuntu 
Shell :: install docker wsl 
Shell :: how to find empty folders linux 
Shell :: git get remote branches 
Shell :: sum decimals bash 
Shell :: xcode There is not enough disk space available to install the product. 
Shell :: linux get dir of file 
Shell :: AVCONV linux how to install 
Shell :: how to install graphviz jupyter 
Shell :: git revert merge 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =