terminal
The goal here is to provide the necessary commands and environment for each OS.
The terminal
is the famous cmd (command prompt) in windows. In simple terms, it refers to a black screen. It is also called terminal
or `term.
There are various terminals, or applications (software) in `terminal'.
Personally, I recommend wezterm, but here we will use an os-specific one.
package manager
First, we will explain package manager
.
In this case, you need to install a package manager for each OS.
Note that packages and programs here can also be referred to as apps.
Think of a package manager as something that simplifies the installation of an app.
Usually, an app works by building or compiling a source (source) and executing the binary that is created.
In the case of windows, .exe
is a binary.
Binaries differ depending on the operating system.
Incidentally, source is often abbreviated to src
and binary is often abbreviated to bin
.
To return to the topic, the package manager automatically handles which packages (binaries) are downloaded from where and where they are placed.
The reason why this is done is that it takes time to build a source.
Therefore, most packages are simply downloaded from the server (server) as binaries that have already been built on the OS in question.
Most of them are called package managers.
From now on, you will install this package manager and use it from the terminal
.
windows
This section describes the required environment for windows users.
winget
scoop
windows terminal
wsl
Be careful with the windows environment; remember that windows basically does not work as per the docs.
For example, most of the commands in github/microsoft will not work. It may not work.
Therefore, you will need to configure and read them according to your environment.
First, install winget as a windows package manager.
Press win+r
and type powershell
to start powershell. powershell will henceforth be abbreviated as pwsh
.
Execute the following command.
pwsh
Install-Module -Name Microsoft.WinGet.Client
Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): A
Next, install windows terminal.
search package
winget search "windows terminal"
Name Id Version Source
--------------------------------------------------------------------------------
Windows Terminal 9N0DX20HK701 Unknown msstore
Windows Terminal Preview 9N8G5RFZ9XK3 Unknown msstore
Windows Terminal Microsoft.WindowsTerminal 1.16.10261.0 winget
Windows Terminal Preview Microsoft.WindowsTerminal.Preview 1.17.10234.0 winget
install terminal
winget install 9N0DX20HK701
or
winget install Microsoft.WindowsTerminal
Since windows is very unwieldy with shell, we will run linux (ubuntu) with wsl. Basically, rust and shell are explained assuming a linux environment.
setting wsl
wsl --install
wsl --install -d Ubuntu
If you prefer a windows environment instead of linux, you can install curl
etc. from scoop or other package managers.
install scoop
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser # Optional: Needed to run a remote script the first time
irm get.scoop.sh | iex
pwsh
scoop install curl git rust
Install and update pwsh
.
winget install Microsoft.PowerShell
winget upgrade --all
mac
terminal
homebrew
For mac
, use the default terminal.
Open finder
and press cmd+shift+u
. You will find `terminal(terminal.app)' in it.
First install the package manager homebrew.
install brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install curl git zsh rust
linux
I will omit the description for linux users as it needs no explanation.
I will use archlinux.
pacman -Syu curl git zsh rust
$ cargo version
cargo 1.70.0