How to add an alias in csh. Edit .cshrc file. Add an alias.
alias hello ls -l |
Load.
source .cshrc |
cloud engineer
How to add an alias in csh. Edit .cshrc file. Add an alias.
alias hello ls -l |
alias hello ls -l
Load.
source .cshrc |
source .cshrc
Here’s how to add a path to zsh permanently.
Edit .zshrc file and add the path. Create .zshrc file if it’s missing.
export PATH=$PATH:/new/path |
export PATH=$PATH:/new/path
Exit and relaunch shell. The new path should be in effect.
Echo to display new path.
echo $PATH |
echo $PATH
To undo a git add, run git reset file or get reset.
git reset filename git reset |
git reset filename git reset
Run git status to check.
git status |
git status
Create an alias.
alias gcloud='docker run --rm -ti --volumes-from gcloud-config google/cloud-sdk:latest gcloud' |
alias gcloud='docker run --rm -ti --volumes-from gcloud-config google/cloud-sdk:latest gcloud'
Remove an alias.
unalias gcloud |
unalias gcloud
Here’s how to add a new route in Google Cloud Platform.
gcloud compute routes create name-of-new-route \ --destination-range=200.20.0.0/15 \ --next-hop-gateway=default-internet-gateway \ --project=host-project \ --network="default" \ --priority=900 |
gcloud compute routes create name-of-new-route \ --destination-range=200.20.0.0/15 \ --next-hop-gateway=default-internet-gateway \ --project=host-project \ --network="default" \ --priority=900