Mac new machine configuration related environment

Construction and Interpretation of Computer Programs

curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

1-1 /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)”

1-2 About macos: How to check the current value of the $PATH variable on OS X?

https://www.codenong.com/14617041/

1- 3 mac six screenshot methods shortcut key configuration method screenshot save location modification [control+command+shift+4]

insert image description here

1-4 mac open terminal

command+space -----> magnifying glass----> terminal

1-5 mac install git

Follow the official website to operate

https://blog.csdn.net/rockvine/article/details/122898165

1-5-1 How to configure the SSH key part in the git remote warehouse

1-5-1. Why can't echo $shell display the shell value?

echo SHELL Displays learned environment variables SHELL Displays learned environment variablesS H E LL shows the value of the environment variable SHELL.
What is an environment variable?
In the current environment, those special variables that are used by the system or application program and exist fixedly are called.
Environment variables can be predetermined by the system or determined by the system. You define and modify by yourself, also known as overall variables.
That is to say: no matter where you are, the values ​​of these variables exist with your environment.
Common environment variables:
$SHELL which shell
$TERM terminal The type of
$MAIL Mail receiving location
$PATH Program search path
The method of displaying environment variables is as follows:
echo $variable name
For example: echo $PATH

1-6 How to check whether node is installed on mac and perform corresponding operations

1-7 Lock screen shortcut keys

ctrl+command+q

1-8 Installation and testing of node.js environment in Mac

node -v
npm -v

1-9. How to add ssh to GitLab

Gitlab prompt: Your account is pending approval from your GitLab administrator and hence bl
requires administrator review

Git remote warehouse
GitLab how to add ssh

1-9-1

How to view hidden folders on mac: Command + Shift + .

1-10

Command to exit edit mode in Linux

1-11

    • ls----------->ls -al------------>. pwd (display the folder)------------- -> cat id_rsa.pub-------> open ------>ls -al

1-12 Install nvm

brew install nvm

You should create NVM’s working directory if it doesn’t exist:

mkdir ~/.nvm

Add the following to /Users/runner/.bash_profile or your desired shell
configuration file:

export NVM_DIR=“ H O M E / . n v m " [ − s " HOME/.nvm" [ -s " HOME/.nvm"[s"(brew --prefix)/opt/nvm/nvm.sh” ] && . “KaTeX parse error: Expected 'EOF', got '#' at position 34: …t/nvm/nvm.sh" #̲ This loads nvm…(brew --prefix)/opt/nvm/etc/bash_completion.d/nvm” ] && . “$(brew --prefix)/opt/nvm/etc/bash_completion.d/nvm” # This loads nvm bash_completion

You can set $NVM_DIR to any location, but leaving it unchanged from
$(brew --prefix)/Cellar/nvm/0.39.3 will destroy any nvm-installed Node installations
upon upgrade/reinstall.

Type nvm help for further information.

1-12 nvm install node

Use nvm ls-remote to display all versions of node.js that can be installed

  1. Use the nvm install node version number or directly enter the latest version of nvm install node

2. Use nvm list or nvm ls to view the currently installed node version

3. Use nvm use node version to switch the currently used node

4. Use nvm alias default node version to specify the node version when the terminal is opened by default

// Use Taobao warehouse
npm config set registry https://registry.npm.taobao.org

1-13

insert image description here

insert image description here

Guess you like

Origin blog.csdn.net/hannah2233/article/details/128917170