Amazon recommends adding zsh to .bashrc to change default shell for AWS CloudShell, since chsh somehow doesn't work. As I understand correctly, zsh runs in a child process. I wonder if I could add source zsh to .bashrc instead, since I'd like one less process as a minimalist.
Difference of "zsh" vs "source zsh" in ".bashrc"
552 Views Asked by Diego At
1
There are 1 best solutions below
Related Questions in BASH
- When does Bash read heredocs?
- Why `set -o pipefail` gives different output even though the pipe is not failing
- Run an external command within jq to manipulate each values of a particular key
- API key 401 error in .env.development file
- How to "Enable mobile data" on a Huawei E3372 4G USB dongle using a bash script in Windows
- ImageMagick / Bash : pipe ignored(?) when filename format variable used
- MacOS Bash-Script: while read p and echo
- Parse command line arguments and write useful usage message without additional code
- JQ JSON - Values to Array
- why variable substitution is so different?
- postbank_pdf2csv: how to setup with Cygwin in Windows?
- Custom Bash functions & custom statements - Need some advice
- unexpected operator == in square brackets when trying to use gum lib
- How to disable a bash builtin inside a docker container
- Use sed or rename find series of alphabet then replace with with the same alphabet and a dash -
Related Questions in AMAZON-WEB-SERVICES
- S3 integration testing
- How to get content of BLOCK types LAYOUT_TITLE, LAYOUT_SECTION_HEADER and LAYOUT_xx in Textract
- Error **net::ERR_CONNECTION_RESET** error while uploading files to AWS S3 using multipart upload and Pre-Signed URL
- Failed to connect to your instance after deploying mern app on aws ec2 instance when i try to access frontend
- AWS - Tab Schema Conversion don't show up after creating a Migration Project
- Unable to run Bash Script using AWS Custom Lambda Runtime
- Using Amazon managed Prometheus to get EC2 metrics data in Grafana
- AWS Dns record A not navigate to elb
- Connection timed out error with smtp.gmail.com
- AWS Cognito Multi-tenant Integration | Ok to use Client’s Idp?
- Elasticbeanstalk FastAPI application is intermittently not responding to https requests
- Call an External API from AWS Lambda
- Why my mail service api spring isnt working?
- export 'AWSIoTProvider' (imported as 'AWSIoTProvider') was not found in '@aws-amplify/pubsub'
- How to take first x seconds of Audio from a wav file read from AWS S3 as binary stream using Python?
Related Questions in ZSH
- ZSH function parameters conundrum
- Expect: Any way to match a specific rule only once?
- The zsh command returns an error when I use a variable in the parameters
- Text selection replacement in ZSH
- Getting a double prompt with zsh and oh-my-zsh. Additionally source ~/.zshrc takes over 20 seconds to complete
- How to remove trailing slash from ZSH’s _files results?
- Starting Node.js on MacOS programmatically
- VSCode task with pyenv and zsh
- am reinstalling flutter and I can't seem to run it, with PATH variables in the .bashrc and .zshrc all configured
- Cannot Pass Whitespace Containing Shell Arguments - Double Quotes, Escape Chars etc. Not Working
- cd ~[TAB] doesn't behave as expected
- Running the `code` command creates two new windows on wsl + tmux
- Integrated terminal in VSCode not allowing me to use zsh
- Getting zsh command not found wp-scripts error
- How to escape a command line for logging?
Related Questions in AWS-CLOUDSHELL
- Connecting to EC2 instance via CloudShell using its private IP
- Downloading aws cloudshell file to local windows machine
- How can I add request header parameters in HTTP integration WebSocket api gateway AWS
- AWSCloudShell - CDK Bootstrap failure with NodeJS version 16 EOL, how to upgrade?
- cloudshell rename only specific files that has date timestamp
- rename files with dates timestamp in aws cloudshell
- How to install postgres-client 'psql' in AWS CloudShell permanently
- (RESOLVED) AWS CloudShell not accepting ARN for Comprehend Document Classifier?
- How to get N files from S3 bucket ordered by max size and modified after certain date using CloudShell?
- Running multiple MSCK REPAIR TABLE statements in AWS Athena
- AWS CloudShell not working after creating a new account with Control Tower
- Unable to install postgresql-client client on AWS Cloud Shell
- AWS CloudShell - List instances by ARN prefix
- How to exclude a specific user when deleting all user in Cognito user pool
- Difference of "zsh" vs "source zsh" in ".bashrc"
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I think you mean
exec zsh, notsource zsh, sincesourceprocesses the file as a set of bash statements, and therefore can't be used with binaries.You can do it, but some caution is advised:
Assume that you have in this way established an interactive zsh, in which you work, and at one time during your work, you want to create an interactive bash subshell (maybe for playing around with some bash commands). If you have a plain
exec zshin your .bashrc, your invocation ofbashwould again result in a zsh - not what you want.In order to avoid this, you can use a guard in your .bashrc, like this:
In your "top level" aws bash, this will replace the bash process by zsh, but in any child bash process, you will stick with bash.