If winget
does not work, you should upgrade App Installer
[x] Installation
winget source
If you cannot search the target item with winget search
, confirm winget source list
winget source list
Name Argument Explicit
--------------------------------------------------------------
msstore https://storeedgefd.dsx.mp.microsoft.com/v9.0 false
If you cannot find the source target, winget
, then you should add it.
Run Terminal as Administrator and add the target to source:
winget source add -n winget -a https://winget.azureedge.net/cache
winget source list
Name Argument Explicit
--------------------------------------------------------------
winget https://winget.azureedge.net/cache false
msstore https://storeedgefd.dsx.mp.microsoft.com/v9.0 false
winget search 'Windows Terminal'
winget install Microsoft.WindowsTerminal.Preview
If your keyaboard layout is Japanese, you can try the following tools when you use the US Keyboad layout.
[x] Installation
I extracted to C:<USER_DIR>\Tools\MyToolsForStartup
It is useful that you create shortcuts and deploy the Startup
folder.
shell:startup
winget install Google.JapaneseIME
Hankaku/Zenkaku
to Ctrl
+ Space
Check your PowerShell Version
$PSVersionTable
Name Value
---- -----
PSVersion 5.1.22621.2506
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.22621.2506
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
If your PowerShell version is not latest, you should upgrade
winget search Microsoft.PowerShell
winget search Microsoft.PowerShell
Name Id Version Source
---------------------------------------------------------------
PowerShell Microsoft.PowerShell 7.4.2.0 winget
PowerShell Preview Microsoft.PowerShell.Preview 7.5.0.2 winget
winget install --id Microsoft.Powershell
winget install --id Microsoft.Powershell.Preview
WSL2 is a Windows Subsystem for Linux that allows access to Linux tools and applications directly from the Windows environment12. It offers the best of both worlds by allowing you to run Windows apps, like Visual Studio, alongside a Linux shell for easier command line access2. WSL2 uses a virtual machine, and uses a full Linux kernel built and shipped with Windows23. With WSL2, you can build docker images that paravirtualize your GPU4.
It is also possible to activate WSL from the command line below without activating it from the GUI.
Run as Administrator
PowerShell and enable the following features:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:HypervisorPlatform /all /norestart
And restart
Restart-Computer -Force
Update WSL
wsl --update
Check the available distributions
wsl --list --online
NAME FRIENDLY NAME
Ubuntu Ubuntu
Debian Debian GNU/Linux
kali-linux Kali Linux Rolling
Ubuntu-18.04 Ubuntu 18.04 LTS
Ubuntu-20.04 Ubuntu 20.04 LTS
Ubuntu-22.04 Ubuntu 22.04 LTS
Ubuntu-24.04 Ubuntu 24.04 LTS
OracleLinux_7_9 Oracle Linux 7.9
OracleLinux_8_7 Oracle Linux 8.7
OracleLinux_9_1 Oracle Linux 9.1
openSUSE-Leap-15.5 openSUSE Leap 15.5
SUSE-Linux-Enterprise-Server-15-SP4 SUSE Linux Enterprise Server 15 SP4
SUSE-Linux-Enterprise-15-SP5 SUSE Linux Enterprise
Install the latest Ubuntu.
wsl --install Ubuntu-24.04
Installing: Ubuntu 24.04 LTS
Ubuntu 24.04 LTS has been installed.
Launching Ubuntu 24.04 LTS...
Installing, this may take a few minutes...
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: shinyay
New password:
Retype new password:
passwd: password updated successfully
Installation successful!
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
Welcome to Ubuntu 24.04 LTS (GNU/Linux 5.15.146.1-microsoft-standard-WSL2 x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/pro
System information as of Sun Apr 28 13:57:02 JST 2024
System load: 0.66 Processes: 28
Usage of /: 0.1% of 1006.85GB Users logged in: 0
Memory usage: 2% IPv4 address for eth0: 172.18.224.114
Swap usage: 0%
This message is shown once a day. To disable it please create the
/home/shinyay/.hushlogin file.
Upgrade packages
sudo apt update && sudo apt upgrade
sudo vim /etc/wsl.conf
Add the followings:
[network]
hostname=wsl
Then you should shutdown WSL with PowerShell.
wsl --shutdown
Run your WSL again, now your configuration is enabled.
SECTION | ITEM | SETTING | NOTE |
---|---|---|---|
boot |
systemd |
true |
Enable systemd support |
network |
hostname |
<YOUR_HOSTNAME> |
Hostname for your WSL Instance |
interop |
appendWindowsPath |
false / true |
Apped your Windows PATH or not |
user |
default |
<YOUR_USERNAME> |
WSL Login Username |
Terminal settings:
Ubuntu24.04 LTS
Windows Terminal Preview
Homebrew is an open-source software package manager that makes it easier to install software on macOS (Apple's operating system) and Linux. Basically, a package manager's job is to find and install the right software packages that will allow you to compile and run various apps/software on your specific operating system.
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
==> This script will install:
/home/linuxbrew/.linuxbrew/bin/brew
/home/linuxbrew/.linuxbrew/share/doc/homebrew
/home/linuxbrew/.linuxbrew/share/man/man1/brew.1
/home/linuxbrew/.linuxbrew/share/zsh/site-functions/_brew
/home/linuxbrew/.linuxbrew/etc/bash_completion.d/brew
/home/linuxbrew/.linuxbrew/Homebrew
==> The following new directories will be created:
/home/linuxbrew/.linuxbrew/bin
/home/linuxbrew/.linuxbrew/etc
/home/linuxbrew/.linuxbrew/include
/home/linuxbrew/.linuxbrew/lib
/home/linuxbrew/.linuxbrew/sbin
/home/linuxbrew/.linuxbrew/share
/home/linuxbrew/.linuxbrew/var
/home/linuxbrew/.linuxbrew/opt
/home/linuxbrew/.linuxbrew/share/zsh
/home/linuxbrew/.linuxbrew/share/zsh/site-functions
/home/linuxbrew/.linuxbrew/var/homebrew
/home/linuxbrew/.linuxbrew/var/homebrew/linked
/home/linuxbrew/.linuxbrew/Cellar
/home/linuxbrew/.linuxbrew/Caskroom
/home/linuxbrew/.linuxbrew/Frameworks
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/shinyay/.bashrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
sudo apt-get install build-essential
brew install gcc
brew doctor
brew update
brew outdated
brew upgrade
Check pre-installed Git
which git
/usr/bin/git
git -v
git version 2.43.0
brew install git
which git
/home/linuxbrew/.linuxbrew/bin/git
git --version
git version 2.47.0
git config --global user.name "shinyay" && \
git config --global user.email "<YOUR_MAILADDRESS>" && \
git config --global core.quotepath false && \
git config --global core.safecrlf true && \
git config --global core.autocrlf false && \
git config --global core.editor 'vim -c "set fenc=utf-8"' && \
git config --global color.diff auto && \
git config --global color.status auto && \
git config --global color.branch auto && \
git config --global fetch.prune true && \
git config --global init.defaultBranch main && \
git config pull.ff only
All repositories
Read and write
ssh-keygen -t ed25519 -C 'mail address for github'
cat $HOME/.ssh/id_ed25519.pub | clip.exe
[x] Add a public key on the following site:
gpg --gen-key
gpg (GnuPG) 2.4.4; Copyright (C) 2024 g10 Code GmbH
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Note: Use "gpg --full-generate-key" for a full featured key generation dialog.
GnuPG needs to construct a user ID to identify your key.
Real name: <GITHUB_USER_NAME>
Email address: <GITHUB_EMAIL_ADDRESS>
You selected this USER-ID:
"YOUR_NAME <YOUR_EMAIL_ADDRESS>"
Change (N)ame, (E)mail, or (O)kay/(Q)uit? O
gpg --list-secret-keys --keyid-format LONG
-----------------------------------------
sec rsa4096 2022-03-21 [SC] [expires: 2024-03-20]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
uid [ ultimate ] <user@example.com>
ssb rsa4096 2022-03-21 [E] [expires: 2024-03-20]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
is your GPG Key
git config --global gpg.program gpg
git config --global user.signingkey <GPG Key>
git config --global commit.gpgsign true
gpg --export --armor <YOUR_EMAI_ADDRESS_FOR_GPGKEY> | clip.exe
git commit -S -m 'YOUR_COMMIT_MESSAGE'
You can find verified on your commit.
Update and Upgrade packages.
sudo apt update && sudo apt upgrade
brew update && brew upgrade
[x] Installation
zip
unzip
brew install zip unzip
Fontconfig is a library designed to provide system-wide font configuration, customization and application access.
sudo apt-get install fontconfig
This is a collection of utilities for the Windows Subsystem for Linux (WSL), such as converting Linux paths to Windows paths or creating Linux application shortcuts on the Windows Desktop.
sudo apt-get install wslu
Commands list:
dpkg -L wslu | grep bin/
List aliases:
git config --get-regexp ^alias\.
Alias for Alias list
git config --global alias.alias 'config --get-regexp ^alias\.'
git status
git config --global alias.st 'status --verbose --short --branch --untracked-files'
git log
git config --global alias.plog "log --pretty='format:%C(yellow)%h %C(green)%cd %C(reset)%s %C(red)%d %C(cyan)[%an]' --date=iso"
git config --global alias.glog "log --pretty='format:%C(yellow)%h %C(green)%cd %C(reset)%s %C(red)%d %C(cyan)[%an]' --date=format:'%c' --all --graph"
git config --global alias.count 'shortlog -e -s -n'
GitHub CLI, or gh, is a command-line interface to GitHub for use in your terminal or your scripts.
brew install gh
gh --version
gh version 2.48.0 (2024-04-17)
https://github.com/cli/cli/releases/tag/v2.48.0
gh auth login
? What account do you want to log into? GitHub.com
? What is your preferred protocol for Git operations on this host? SSH
? Upload your SSH public key to your GitHub account? $HOME/.ssh/id_ed25519.pub
? Title for your SSH key: GitHub CLI
? How would you like to authenticate GitHub CLI? Login with a web browser
Text editor program to use for authoring text
gh config set editor vim
GitHub Copilot in the CLI is an extension for GitHub CLI which provides a chat-like interface in the terminal that allows you to ask questions about commands you run from the command line.
If you are have not authenticated with your GitHub account, login.
gh auth login
Install the Copilot in the CLI extension
gh extension install github/gh-copilot
Update Copilot in the CLI
gh extension upgrade gh-copilot
[copilot]: upgraded from v1.0.1 to v1.0.2
✓ Successfully upgraded extension
You can ask Copilot in the CLI to explain a command
gh copilot explain
? Which command would you like to explain?
> apt-get
Explanation:
• apt-get is the package management command-line tool for Debian-based systems.
• It is used to install, upgrade, and remove software packages.
• Commonly used flags include:
• install is used to install packages.
• remove is used to remove packages.
• update is used to update package lists from repositories.
• upgrade is used to upgrade installed packages to their latest versions.
• search is used to search for packages based on keywords.
• show is used to display detailed information about a specific package.
• upgrade is used to upgrade installed packages to their latest versions.
• dist-upgrade is used to perform a distribution upgrade, including installing and removing packages as
necessary.
• autoremove is used to remove automatically installed packages that are no longer needed.
• clean is used to remove downloaded package files from the package cache.
• purge is used to remove packages and their configuration files.
• For more information and usage examples, refer to the apt-get manual page by running man apt-get.
Alternatively, you can add the command you want explained directly to the prompt:
gh copilot explain 'apt-get'
gh copilot suggest "Upgrade apt-get itself"
? What kind of command can I help you with?
> generic shell command
Suggestion:
sudo apt-get update && sudo apt-get upgrade -y
? Select an option [Use arrows to move, type to filter]
> Copy command to clipboard
Explain command
Execute command
Revise command
Rate response
Exit
Fish, or the "Friendly Interactive SHell", is a Unix shell designed with an emphasis on user-friendliness and interactive use. It was introduced in 2005 and has since gained a following due to its unique features, helpful defaults, and focus on a pleasant user experience.
brew install fish
fish --version
fish, version 3.7.1
Check the PATH for fish
.
which fish
/home/linuxbrew/.linuxbrew/bin/fish
Write the PATH for fish
to define the valid shell.
sudo sh -c "echo /home/linuxbrew/.linuxbrew/bin/fish >> /etc/shells"
Define fish
as a Default Shell.
chsh -s /home/linuxbrew/.linuxbrew/bin/fish
Reboot WSL and check fish
.
echo $SHELL
Define the PATH of brew
on fish
.
echo 'eval (/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >> $HOME/.config/fish/config.fish
Restart Terminal
Check brew doctor
.
brew doctor
Fisher is a plugin manager for the Fish shell. It lets you install, update, and remove plugins like a boss. You can take control of functions, completions, bindings, and snippets from the command line. Fisher's zero impact on shell startup keeps your shell zippy and responsive1. Fisher is 100% pure-Fish, making it easy to contribute or modify.
[x] Installation
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher
fisher -v
fisher, version 4.4.4
The ultimate Fish prompt.
fisher install IlanCosman/tide@v6
tide configure --auto --style=Rainbow --prompt_colors='True color' --show_time='12-hour format' --rainbow_prompt_separators=Round --powerline_prompt_heads=Round --powerline_prompt_tails=Round --powerline_prompt_style='Two lines, character and frame' --prompt_connection=Disconnected --powerline_right_prompt_frame=Yes --prompt_connection_andor_frame_color=Darkest --prompt_spacing=Sparse --icons='Many icons' --transient=Yes
If you install tide
, you can't install bobthefish
[ ] Installation
fisher install oh-my-fish/theme-bobthefish
vim $HOME/.config/fish/config.fish
set -g theme_display_git_master_branch yes
set -g theme_display_git yes
set -g theme_display_git_dirty yes
set -g theme_display_git_untracked yes
set -g theme_display_git_ahead_verbose yes
set -g theme_display_git_dirty_verbose yes
set -g theme_display_git_stashed_verbose yes
set -g theme_git_worktree_support no
set -g theme_use_abbreviated_branch_name no
set -g theme_display_vagrant no
set -g theme_display_docker_machine no
set -g theme_display_k8s_context no
set -g theme_display_hg no
set -g theme_display_virtualenv no
set -g theme_display_nix no
set -g theme_display_ruby no
set -g theme_display_nvm no
set -g theme_display_user ssh
set -g theme_display_hostname ssh
set -g theme_display_vi no
set -g theme_display_date yes
set -g theme_display_cmd_duration yes
set -g theme_title_display_process no
set -g theme_title_display_path yes
set -g theme_title_display_user no
set -g theme_title_use_abbreviated_path no
set -g theme_date_format "+%F %H:%M"
set -g theme_date_timezone Asia/Tokyo
set -g theme_avoid_ambiguous_glyphs yes
set -g theme_powerline_fonts yes
set -g theme_nerd_fonts no
set -g theme_show_exit_status yes
set -g theme_display_jobs_verbose yes
set -g default_user your_normal_user
set -g theme_color_scheme loght
set -g fish_prompt_pwd_dir_length 0
set -g theme_project_dir_length 1
set -g theme_newline_cursor yes
set -g theme_newline_prompt ''
[x] Installation
mkdir download && cd download
curl -L -O https://github.com/yuru7/moralerspace/releases/download/v1.0.0/MoralerspaceHWJPDOC_v1.0.0.zip
curl -L -O https://github.com/yuru7/moralerspace/releases/download/v1.0.0/MoralerspaceHWNF_v1.0.0.zip
curl -L -O https://github.com/yuru7/moralerspace/releases/download/v1.0.0/MoralerspaceHW_v1.0.0.zip
curl -L -O https://github.com/yuru7/moralerspace/releases/download/v1.0.0/MoralerspaceJPDOC_v1.0.0.zip
curl -L -O https://github.com/yuru7/moralerspace/releases/download/v1.0.0/MoralerspaceNF_v1.0.0.zip
curl -L -O https://github.com/yuru7/moralerspace/releases/download/v1.0.0/Moralerspace_v1.0.0.zip
unzip MoralerspaceHWJPDOC_v1.0.0.zip
unzip MoralerspaceHWNF_v1.0.0.zip
unzip MoralerspaceHW_v1.0.0.zip
unzip MoralerspaceJPDOC_v1.0.0.zip
unzip MoralerspaceNF_v1.0.0.zip
unzip Moralerspace_v1.0.0.zip
sudo mkdir /usr/share/fonts/truetype/moralerspace
sudo cp MoralerspaceHWJPDOC_v1.0.0/*.ttf /usr/share/fonts/truetype/moralerspace/
sudo cp MoralerspaceHWNF_v1.0.0/*.ttf /usr/share/fonts/truetype/moralerspace/
sudo cp MoralerspaceHW_v1.0.0/*.ttf /usr/share/fonts/truetype/moralerspace/
sudo cp MoralerspaceJPDOC_v1.0.0/*.ttf /usr/share/fonts/truetype/moralerspace/
sudo cp MoralerspaceNF_v1.0.0/*.ttf /usr/share/fonts/truetype/moralerspace/
sudo cp Moralerspace_v1.0.0/*.ttf /usr/share/fonts/truetype/moralerspace/
sudo fc-cache -vf
fc-list | grep -i moralerspace
explorer.exe .
Then install *ttf
.
Then delete downloaded fonts.
cd ..
rm -fr download
ctrl
+ ,
[ ] Installation
Clear Caches and turn off and on Swap aria
function clearCaches
sudo sh -c "echo 3 > '/proc/sys/vm/drop_caches' && swapoff -a && swapon -a"
end
funcsave clearCaches
Confirl a persisntent file
ls -l ~/.config/fish/functions/clearCaches.fish
Simplistic interactive filtering tool
By pushing ctrl
+ r
, you can search shell history
brew install peco
fisher install oh-my-fish/plugin-peco
abbr -a history peco_select_history
fzf
fzf
is a general-purpose command-line fuzzy finder.
brew install fzf
A cat(1) clone with syntax highlighting and Git integration.
brew install bat
fd
is a program to find entries in your filesystem. It is a simple, fast and user-friendly alternative tofind
.
brew install fd
Augment your Fish command line with mnemonic key bindings to efficiently find what you need using fzf. Use fzf.fish to interactively find and insert file paths, git commit hashes, and other entities into your command line. Tab to select multiple entries. If you trigger a search while your cursor is on a word, that word will be used to seed the fzf query and will be replaced by your selection. All searches include a preview of the entity hovered over to help you find what you're looking for.
fisher install PatrickF1/fzf.fish
echo "### fzf.fish" | tee -a $HOME/.config/fish/config.fish
echo "fzf_configure_bindings --directory=\cf --git_log=\cl --git_status=\cs" | tee -a $HOME/.config/fish/config.fish
echo "" | tee -a $HOME/.config/fish/config.fish
Key bind | Description |
---|---|
Ctrl +r |
Command history |
Ctrl +Alt +v |
Environment variables |
Ctrl +Alt +f |
Recursive listing |
Ctrl +Alt +s |
git status |
Ctrl +Alt +l |
git log |
By z, it tracks the directory you have visited
fisher install jethrokuan/z
By bd, you can quickly go back to a parent directory in your current working directory tree
fisher install 0rax/fish-bd
This plugin adds a function to print out the fish-shell ASCII-art logo.
fisher install laughedelic/fish_logo
The description in fish_greeting.fish
is executed when you log in to fish.
vim $HOME/.config/fish/functions/fish_greeting.fish
Add the followings:
# fish_logo
echo "Hello $(whoami) at $(date)"
fish -v
fisher -v
fish_logo blue cyan green
brew tap SDKMAN/tap
brew install SDKMAN-cli
Makes command sdk from SDKMAN! usable from fish, including auto-completion. Also adds binaries from installed SDKs to the PATH.
fisher install reitzig/sdkman-for-fish@v2.1.0
sdk
You don't seem to have SDKMAN! installed. Install now? [y/N] y
And then open a new terminal/shell to load SDKMAN!.
sdk version
SDKMAN!
script: 5.18.2
native: 0.4.6
abbr
- manage fish abbreviations
curl https://raw.githubusercontent.com/fish-shell/fish-shell/master/share/completions/abbr.fish > $HOME/.config/fish/completions/abbr.fish
apt-get
- APT package handling utility -- command-line interface
curl https://raw.githubusercontent.com/fish-shell/fish-shell/master/share/completions/apt-get.fish > $HOME/.config/fish/completions/apt-get.fish
bd
- Quickly go back to a parent directory up in your current working directory tree
curl https://raw.githubusercontent.com/fish-shell/fish-shell/master/share/completions/bd.fish > $HOME/.config/fish/completions/bd.fish
code
- Visual Studio Code
curl https://raw.githubusercontent.com/fish-shell/fish-shell/master/share/completions/code.fish > $HOME/.config/fish/completions/code.fish
curl
- transfer a URL
curl https://raw.githubusercontent.com/fish-shell/fish-shell/master/share/completions/curl.fish > $HOME/.config/fish/completions/curl.fish
git
- the stupid content tracker
curl https://raw.githubusercontent.com/fish-shell/fish-shell/master/share/completions/git.fish > $HOME/.config/fish/completions/git.fish
gh
- gh - GitHub CLI
curl https://raw.githubusercontent.com/fish-shell/fish-shell/master/share/completions/gh.fish > $HOME/.config/fish/completions/gh.fish
After Docker installation, you can do the following:
docker completion fish > $HOME/.config/fish/completions/docker.fish
winget search docker
winget install Docker.DockerDesktop
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; sudo apt-get remove $pkg; end
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
set arch (dpkg --print-architecture)
set codename (awk -F= '/VERSION_CODENAME/ {print $2}' /etc/os-release | tr -d '"')
echo "deb [arch=$arch signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $codename stable" \
| sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
The Docker daemon binds to a Unix socket, not a TCP port. By default it's the root user that owns the Unix socket, and other users can only access it using sudo. The Docker daemon always runs as the root user. If you don't want to preface the docker command with sudo, create a Unix group called docker and add users to it. When the Docker daemon starts, it creates a Unix socket accessible by members of the docker group.
sudo usermod -aG docker $USER
Reboot your WSL by PowerShell.
wsl --shutdown
Activate the changes to groups
newgrp docker
systemctl list-units --type=service --all
or
systemctl list-units --type=service --state=active
You can see like the below:
:
dmesg.service loaded inactive dead Save initial kernel messages af>
docker.service loaded active running Docker Application Container En>
dpkg-db-backup.service loaded inactive dead Daily dpkg database backup serv>
:
sudo systemctl stop docker
sudo systemctl start docker
abbr
: manage fish abbreviations
abbr --add NAME [--position command | anywhere] [-r | --regex PATTERN]
[--set-cursor[=MARKER]] ([-f | --function FUNCTION] | EXPANSION)
abbr --erase NAME ...
abbr --rename OLD_WORD NEW_WORD
abbr --show
abbr --list
abbr --query NAME ...
vim $HOME/.config/fish/config.fish
function set_abbr
abbr --add code code-insiders
abbr --add history peco_select_history
abbr --add l ls -lahF
abbr --add ga git add -v
abbr --add gc git commit -S -m
abbr --add gcpast git commit -S --date=format:relative:1.day.ago -m
abbr --add copilot gh copilot suggest
end
if status is-interactive
# Commands to run in interactive sessions can go here
set_abbr
end
[x] Configuration
Default Profile: Ubuntu 24.04 LTS
Default Terminal Application: Windows Terminal Preview
Launch Size:
110
22
You can select in rectangular with
Alt
+ Mouse select
[x] Configuration
Show acrylic tab row: On
[x] Configuration
Transparency - Background opacity: 90%
Window - Scrollbar Visibility: Hidden
! vscode
Visual Studio Code, often referred to as VSCode, is a free and open-source code editor optimized for building and debugging modern web and cloud applications. It supports various programming languages and comes with features like IntelliSense for smart completions based on variable types, function definitions, and imported modules, built-in Git commands, and debugging tools. It's highly customizable and extensible with various extensions. It's available on multiple platforms including Linux, macOS, and Windows.
winget search VisualStudioCode
winget install Microsoft.VisualStudioCode.Insiders
snap find vscode
sudo snap install code-insiders --classic
The following abbreviation is added to config.fish
abbr --add code 'code-insiders'
The Remote Development extension pack allows you to open any folder in a container, on a remote machine, or in the Windows Subsystem for Linux (WSL) and take advantage of VS Code's full feature set. Since this lets you set up a full-time development environment anywhere.
sudo apt-get install wget ca-certificates
The following extesions are also installed:
GitHub Copilot provides autocomplete-style suggestions from an AI pair programmer as you code. You can receive suggestions from GitHub Copilot either by starting to write the code you want to use, or by writing a natural language comment describing what you want the code to do.
The folloing extention is installed:
Use ctrl
+ i
to open incline chat.
Type /
to view all available chat commands.
The Docker extension makes it easy to build, manage, and deploy containerized applications from Visual Studio Code. It also provides one-click debugging of Node.js, Python, and .NET inside a container.
Text Editor
Settings - Everything starts from Ctrl
+ ,
Zoom the font of the editor when using mouse wheel and holding
Ctrl
Ctrl
+ Shift
+ p
and choose Reset Editor Font Size
Controls whether the editor should render control characters.
Controls how the editor render the current line highlight
all
Text Editor
- Cursor
Control the cursor animation style
expand
Control whether the sooth caret animation be enabled.
Control the cursor style
block
Text Editor
- Formatting
Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.
Controls whether the editor should automatically format the line after typing.
Text Editor
- Minimap
Controls whether the minimap is shown.
Text Editor
- Files
When Enabled, insert a final new line at the end of the file saving it.
When enabled, will trim trailing whitespace when saving a file.
Workbench
- Appearance
Specifies the color theme used in the workbench when Window
Tomorrow Night Blue
Workbench
- Zen Mode
Controls whether turning on Zen Mode also centers the layout.
Controls whether turning on Zen Mode also hides the editor line numbers.
Controls whether turning on Zen Mode also hides the status bar at the bottom of the workbench.
VS Code profiles provide a way to organize and isolate customizations within the editor. A profile represents a specific set of configurations that can be easily activated or deactivated. With profiles, users can maintain separate configurations for different projects or teams, to help ensure a seamless transition between development environments.
You can install Azure CLI by Homebrew.
brew update && brew install azure-cli
az version
{
"azure-cli": "2.60.0",
"azure-cli-core": "2.60.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {}
}
You can install Azure CLI by winget
on PowerShell.
winget install -e --id Microsoft.AzureCLI
az login
az -h
az login
You check your subscription at the folloing and set it to Azure CLI
az account set --subscription "<YOUR_SUBSCRIPTION_NAME>"
az extension add --name devcenter --allow-preview true
az extension list
This Dev Container consists of the following three files:
This file is used to build the container image that will contain your development environment. It specifies the base image, installs necessary dependencies, sets up the environment, and copies any project-specific files into the container. The Dockerfile is essential for defining the environment's infrastructure and dependencies.
FROM mcr.microsoft.com/devcontainers/java:1-21-bullseye
USER vscode
WORKDIR /workspace
mcr.microsoft.com/devcontainers/java
, the vscode
user is already defined and can be used by simply specifying itIf you want a base image which Microsoft pre-built, you can find it at the following:
Docker Compose is a tool for defining and running multi-container Docker applications. The
compose.yaml
file defines services, networks, and volumes for your application's containers. While not strictly required for every Dev Container setup, it can be useful for defining more complex development environments with multiple services or containers that need to interact with each other.
services:
playground-java:
container_name: 'playground'
hostname: 'java'
build:
context: .
dockerfile: Dockerfile
restart: always
working_dir: '/workspace'
tty: true
volumes:
- type: bind
source: ../workspace
target: /workspace
services:
playground-java:
container_name: 'playground'
hostname: 'java'
services
: This is the top-level key in a Docker Compose file, and it defines the services that make up your application.playground-java
: This is the name of the service, which in this case is named playground-java
. build:
context: .
dockerfile: Dockerfile
build
: This specifies how to build the Docker image for the service.context: .
: This specifies the build context, which is the directory where the Dockerfile and any other files needed for building the image are located. In this case, it's set to the current directory (.
).dockerfile: Dockerfile
: This specifies the name of the Dockerfile to use for building the image. In this case, it's named Dockerfile
. restart: always
restart: always
: This instructs Docker to always restart the container if it stops for any reason. working_dir: '/workspace'
working_dir: '/workspace'
: This sets the working directory inside the container to /workspace
. When the container starts, commands executed within the container will run relative to this directory. tty: true
tty: true
: This allocates a pseudo-TTY for the service container, which enables interactive shell sessions. volumes:
- type: bind
source: ../workspace
target: /workspace
volumes
: This specifies any volumes to mount into the container.- type: bind
: This indicates that you're using a bind mount, which mounts a directory from the host machine into the container.source: ../workspace
: This specifies the source directory on the host machine to bind mount into the container. It's relative to the location of the compose.yaml
file and points to a directory named workspace
in the parent directory (..
).target: /workspace
: This specifies the target directory inside the container where the source directory will be mounted.The
devcontainer.json
file configures how VS Code connects to and interacts with the Dev Container, including settings for extensions, environment variables, mount points, and more.
{
"name": "Playground - Java",
"dockerComposeFile": "compose.yaml",
"service": "playground-java",
"workspaceFolder": "/workspace",
"remoteUser": "vscode",
"features": {
"ghcr.io/devcontainers/features/java:1": {
"version": "none",
"installMaven": "false",
"installGradle": "true"
}
},
"customizations": {
"vscode": {
"extensions": [
"ms-azuretools.vscode-docker",
"redhat.java",
"vscjava.vscode-java-debug",
"vscjava.vscode-java-dependency",
"vscjava.vscode-java-test",
"vscjava.vscode-maven",
"SonarSource.sonarlint-vscode",
"vmware.vscode-boot-dev-pack",
"MicroProfile-Community.vscode-microprofile-pack",
"redhat.vscode-quarkus"
],
"settings": {
"editor.formatOnSave": true,
"workbench.colorCustomizations": {
"titleBar.activeBackground": "#19549C",
"titleBar.activeForeground": "#ffffff",
"activityBar.background": "#02A7E3",
"activityBar.foreground": "#ffffff"
}
}
}
}
// "forwardPorts": [],
// "postCreateCommand": "java -version"
}
{
"name": "Playground - Java",
"dockerComposeFile": "compose.yaml",
"service": "playground-java",
"workspaceFolder": "/workspace",
"remoteUser": "vscode",
name
: This is the name of the Dev Container configuration, which appears in the VS Code UI.dockerComposeFile
: This specifies the Docker Compose file to use for creating the Dev Container. In this case, it's set to compose.yaml
.service
: This specifies the service within the Docker Compose file that represents the Dev Container. Here, it's set to playground-java
.workspaceFolder
: This specifies the workspace folder within the Dev Container. It's set to /workspace
.remoteUser
: This specifies the user to use within the Dev Container. Here, it's set to vscode
, which is a common choice for development within containers. "features": {
"ghcr.io/devcontainers/features/java:1": {
"version": "none",
"installMaven": "false",
"installGradle": "true"
}
},
features
: This section allows you to specify additional features or tools to include in the Dev Container. In this case, it's specifying a Java feature from a predefined set of Dev Container features. It specifies that Maven should not be installed (installMaven: "false"
) but Gradle should be installed (installGradle: "true"
). "customizations": {
"vscode": {
"extensions": [
"ms-azuretools.vscode-docker"
],
"settings": {
"editor.formatOnSave": true,
"workbench.colorCustomizations": {
"titleBar.activeBackground": "#19549C",
"titleBar.activeForeground": "#ffffff",
"activityBar.background": "#02A7E3",
"activityBar.foreground": "#ffffff"
}
}
}
}
customizations
: This section allows you to customize the VS Code environment within the Dev Container. It specifies extensions to install (ms-azuretools.vscode-docker
) and VS Code settings to apply. In this case, it enables automatic formatting on save ("editor.formatOnSave": true
) and customizes the colors of the title bar and activity bar.The forwardPorts
setting in the devcontainer.json
file is used to specify port forwarding rules from the Dev Container to the local machine, allowing you to access services running inside the container from your local environment. This can be useful when you're running services or applications inside the Dev Container that need to be accessed from outside the container, such as web servers, APIs, or databases.
Here's example of the forwardPorts
setting:
"forwardPorts": [3000, 8080]
This example would forward ports 3000 and 8080 from the Dev Container to the local machine. So if there's a web server running inside the Dev Container on port 3000, you could access it from your local browser at http://localhost:3000
.
You would typically set the forwardPorts
setting when you're developing applications or services that need to be accessible from your local environment but are running inside a container. It's especially useful for web development, where you might have a web server running inside the container serving your application, and you want to test it locally in your browser.
The postCreateCommand
setting in the devcontainer.json
file is used to specify a command that should be executed after the Dev Container is created. This command runs once, immediately after the container is created but before it is started.
You might use the postCreateCommand
setting for various purposes, such as:
Setting up the development environment: You could use this command to perform additional setup steps required for your development environment after the container is created. For example, you might install additional tools or dependencies, initialize databases, or set up configuration files.
Running initialization scripts: If your project requires specific initialization scripts to be executed before development can begin, you can specify these scripts as the postCreateCommand
. This could include running database migrations, setting up test data, or performing any other necessary setup tasks.
Customizing the container environment: You could use the postCreateCommand
to customize the container environment based on specific project requirements. This might involve configuring system settings, setting environment variables, or performing any other customizations needed for your project.
Here's an example of how you might set the postCreateCommand
in the devcontainer.json
file:
"postCreateCommand": "git fetch origin && git diff origin/main"
In this example, this command sequence would execute git fetch origin to fetch the latest changes from the remote repository and then run git diff origin/main to compare the local branch with the main branch on the remote repository.
Overall, the postCreateCommand
setting allows you to automate additional setup steps or customization tasks that need to be performed after the Dev Container is created, helping to streamline the development environment setup process for your project.
I recommend the following Visual Studio Code Extensions for Java Development:
[ ] Installation
Install Dev Container CLI.
F1
).The Docker extension makes it easy to build, manage, and deploy containerized applications from Visual Studio Code. It also provides one-click debugging of Node.js, Python, and .NET inside a container.
[ ] Installation
The Azure command-line interface (Azure CLI) is a set of commands used to create and manage Azure resources. The Azure CLI is available across Azure services and is designed to get you working quickly with Azure, with an emphasis on automation.
brew update && brew install azure-cli
Simple Python Version Management: pyenv
pyenv lets you easily switch between multiple versions of Python. It's simple, unobtrusive, and follows the UNIX tradition of single-purpose tools that do one thing well.
brew install pyenv
List all available versions.
pyenv install --list
Install Python latest version (as of Jan 9, 2024)
pyenv install 3.12.1
If you failed the build, you should run the following command.
brew unlink pkg-config
# brew link pkg-config
brew reinstall pkg-config
Set up the fish shell for Python
vim ~/.config/fish/config.fish
### Python
set -Ux PYENV_ROOT $HOME/.pyenv
fish_add_path $PYENV_ROOT/bin
pyenv init - | source
source $HOME/.config/fish/config.fish
pyenv global 3.12.1
python --version
Python 3.12.1
Get an instant Ubuntu VM with a single command. Multipass can launch and run virtual machines and configure them with cloud-init like a public cloud.
winget search multipass
winget install Canonical.Multipass
> multipass --version
multipass 1.13.1+win
multipassd 1.13.1+win
OBS Studio is a free and open-source software for video recording and live streaming.
winget search obs
winget install OBSProject.OBSStudio
DaVinci Resolve 19 is a professional video editing software that includes everything professional editors need to cut blockbuster films, television shows, and commercials.
ShurePlus MOTIV is a free app that allows users to record high-quality audio with their MOTIV microphones and make real-time adjustments to gain, stereo width, equalization, and compression.
winget search shure
winget install Shure.ShurePlusMOTIV
It's a note-taking and knowledge base app that uses a local folder of plain text files to store notes and allows users to easily link notes together and build a network of knowledge.
winget search obsidian
winget install Obsidian.Obsidian
winget install Valve.Steam
winget install --id Git.Git -e --source winget
Slack is a messaging app for businesses that connects people to the information they need. It allows people to work as one unified team, transforming the way organizations communicate.
winget search slack
winget install slacktechnologies.slack
JDownloader is a free, open-source download management tool with a huge community that makes downloading as easy and fast as it should be.
winget search jdownloader
winget install AppWork.JDownloader
Streamlabs Desktop has everything you need to stream and create a memorable brand.
winget search streamlabs
winget install Streamlabs.Streamlabs
Play your favorite songs, podcasts and albums free on Windows with Spotify.
winget search spotify
winget install Spotify.Spotify
winget search zoom
winget install Zoom.Zoom
winget search chrome
winget install Google.Chrome
One of the few features I missed from macOS is Quick Look. It allows users to peek into a file content in lightning speed by just pressing the Space key.
winget search QuickLook
winget install QL-Win.QuickLook
Create bootable USB drives the easy way
winget install Rufus.Rufus
winget search fastcopy
winget install FastCopy.FastCopy
Anki is a program which makes remembering things easy.
winget search anki
winget install Anki.Anki
Adjust mic gain, monitor mix, EQ, limiter, compressor and more. MV7 users have the additional option of enabling Auto Level Mode; a ‘set it and forget it’ application for consistent recordings every time.
winget search ankimotiv
winget install Shure.ShurePlusMOTIV
Microsoft PowerToys is a set of utilities for power users to tune and streamline their Windows experience for greater productivity.
winget install --id Microsoft.PowerToys --source winget