Setting Up a Computer from Scratch
- 7 minutes read - 1312 wordsTL;DR
Look over the other sections for optional software that is not supported in the package managers. Links will are bold for those you should pay attention to.
Windows Quick Install
Install Chocolatey , then install programs using the following:
choco install -y 7zip anydesk argyll authy-desktop beyondcompare brave bulkrenameutility cmake cuda data-lifeguard-diagnostic dependencywalker digikam displaycal ffmpeg FiraCode Firefox Ghostscript gimp git git-fork GoogleChrome handbrake hugo-extended imagemagick InkScape irfanview jabref jre8 languagetool llvm makemkv microsoft-edge miktex miniconda3 namebench ninja nodejs obs obs-studio pandoc plex PowerShell powertoys python3 quicklook repoz seatools signal slack speedtest spotify steam steam-client sublimetext3 sumatrapdf vcredist140 vcredist2010 vcredist2015 vcredist2017 vcxsrv visualstudio-installer visualstudio2019community vlc vscode vscode-beautify vscode-codespellchecker vscode-cpptools vscode-gitlens vscode-icons vscode-markdownlint vscode-python vscode-todo-tree WhatsApp windirstat xnviewmp zoom zoom-client
Setup WSL
Run before installing any distro to ensure you are using wsl2. Download https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --set-default-version 2
Turn off hibernation
This will save a considerable amount of disc space if you don’t use this feature.
powercfg.exe /hibernate off
LanguageTool Server
- To open the startup folder, hit the Windows key and
r
and typeshell:startup
- Create a shortcut file
- The target should be
C:\ProgramData\chocolatey\lib\languagetool\tools\LanguageTool-5.1\languagetool.jar -t
. - The directory to run in is
C:\ProgramData\chocolatey\lib\languagetool\tools\LanguageTool-5.1
. - Set run to
Minimized
.
- The target should be
Mac Quick Install
xcode-select --install
Install Homebrew , then install programs using the following:
brew tap homebrew/cask-fonts homebrew/cask-drivers
brew install alfred authy bartender beyond-compare cmake dropbox emacs ffmpeg fiji fork git git-lfs google-backup-and-sync google-chrome grandperspective hugo imagemagick istat-menus intel-power-gadget iterm2 jabref languagetool llvm mactex make microsoft-edge miniconda obs obs-virtualcam pandoc ruby signal slack spotify sound-control svn visual-studio-code vlc xquartz zoom zsh
brew install $(brew search font | grep fira | tr '\n' ' ' )
brew install $(brew search font | grep roboto | tr '\n' ' ' )
brew install $(brew search font | grep nerd | tr '\n' ' ' )
Linux Quick Install
sudo apt update && sudo apt upgrade -y
sudo apt install -y atop cmake emacs ffmpeg git git-lfs llvm imagemagick iotop pandoc ruby ruby-dev zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
emacs ~/.zshrc add ZSH_THEME="powerlevel10k/powerlevel10k"
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
chmod 775 Miniconda3-latest-Linux-x86_64.sh
zsh ./Miniconda3-latest-Linux-x86_64.sh
source ~/.zshrc
conda config --add channels conda-forge
Windows General
Install the latest Nvidia drivers from here
CMD
Making a symlink:
- Open a command prompt as administrator
mklink TARGET SOURCE
PowerShell
Making a symlink:
- Open a PowerShell as administrator
New-Item -Path 'link' -ItemType SymbolicLink -Value 'target'
Posh-git
PowerShellGet\Install-Module posh-git
PowerShellGet\Install-Module oh-my-posh
Setup Profile
Allow for scripts to run in powershell Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
https://www.howtogeek.com/126469/how-to-create-a-powershell-profile/
- Update help
Update-Help -Force -ErrorAction SilentlyContinue
- Go to a location by default
Set-Location C:\my\default\working\directory
Setup visual studio dev within Powershell by following these instructions .
#Update-Help -Force -ErrorAction SilentlyContinue
#Set-Location D:\Users\eric\git\programming
& C:\tools\miniconda3\shell\condabin\conda-hook.ps1;
iex 'conda activate C:\tools\miniconda3'
$installPath = &"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -version 16.0 -property installationpath
Import-Module (Join-Path $installPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll")
Enter-VsDevShell -VsInstallPath $installPath -SkipAutomaticLocation
function Set-ColorConsole {
# $Host.Ui.RawUI.BackgroundColor = "Black"
if ($Host.UI.RawUI.WindowTitle -like "*administrator*") {
$Host.UI.RawUI.ForegroundColor = "Red"
}else
{
$Host.Ui.RawUI.ForegroundColor = "Yellow"
}
$hosttime = (Get-ChildItem -Path $PSHOME\PowerShell.exe).CreationTime
$hostversion = "$($Host.Version.Major)`.$($Host.Version.Minor)"
$Host.UI.RawUI.WindowTitle = "PowerShell $hostversion ($hosttime)"
# Clear-Host
}
Set-ColorConsole
function Prompt
{
# $env:COMPUTERNAME + " @ " + (Get-Location) + "> "
if ($Env:CONDA_PROMPT_MODIFIER) {
$Env:CONDA_PROMPT_MODIFIER | Write-Host -NoNewline
}
CondaPromptBackup;
}
Import-Module posh-git
Import-Module oh-my-posh
Set-PoshPrompt Paradox
function Start-Nuvoxel
{
Set-Location D:\Users\eric\git\programming\in-progress\nuvoxel\
iex 'conda activate nuvoxel'
iex 'code .'
}
PowerShell cheat sheet https://www.comparitech.com/net-admin/powershell-cheat-sheet/
Create a batch file that will start up multiple programs at once:
- See
./windows/startup.bat
in this repo - Opening a Windows store app can be a challenge to figure out
Mac General
Optional
brew install adobe-creative-cloud canon-eos-utility canon-eos-webcam-utility logitech-camera-settings microsoft-office microsoft-teams pock
Apps to install
Downlink, meeter, magnet, remote-desktop, pulse-secure, eos webcam
Setting to run after install
- Oh my ZSH setup
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- PowerLevel10k https://github.com/romkatv/powerlevel10k
git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
macs ~/.zshrc` add `ZSH_THEME="powerlevel10k/powerlevel10k"
- Highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
- Auto suggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
- Colorize ls
sudo gem install colorls
- Don’t make ds_store on network
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE
- Allow zoom to use EOS
sudo codesign --remove-signature /Applications/zoom.us.app/
- Use the open JDK
sudo ln -sfn /usr/local/opt/openjdk@11/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk
- Turn off startup sound
sudo nvram StartupMute=%01
- Make LanguageTool server start with login
- Put or link the file
./mac/languagetool-server.plist
to/Library/LaunchDaemons
- Ensure that the file has ownership
root:wheel
and permissions644
- Put or link the file
sudo chown root:wheel /Library/LaunchDaemons/languagetool-server.plsit && sudo chmod 644 /Library/LaunchDaemons/languagetool-server.plsit
Linux General
- Oh my ZSH setup
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- PowerLevel10k https://github.com/romkatv/powerlevel10k
git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
emacs ~/.zshrc
addZSH_THEME="powerlevel10k/powerlevel10k"
- Highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
- Auto suggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
- Colorize ls
sudo gem install colorls
TMUX Commands
General Software
The easiest way to get most of the software installed is to use Chocolatey . You can run a single line in PowerShell and get most of the programs installed without interaction (see the first entry in Programming Software ). The programs in bold below are the ones that are not currently supported in Chocolatey and need to be installed manually.
- Browsers
- Chrome, Edge, Firefox
- Extensions
- Office
- Dropbox
- Zoom
- Slack
- 7-zip
- Windows subsystem for linux
- Type
features
on the Start search bar - Click on
Turn Windows features on or off
- Check
Windows Subsystem for Linux
- Click
ok
and restart - Go to the Windows Store and download Ubuntu
- Replace
bash
withzsh
, how to
- Type
- X11 Server
- Sublime Text
- Add to path to use
subl
from the command prompt - e.g.
C:\Program Files\Sublime Text 3
- Add to path to use
- No Machine
- Turn off access to your computer if you are only using this to access another computer
- I recommend using Windows Remote Desktop for access to Windows computers
Multimedia Software
- Adobe
- Make sure you are signed in first (top right conner).
- VLC
- Set as default movie viewer in
Settings
->Apps
->Default apps
- Set as default movie viewer in
- DaVinci Resolve
- GIMP
- inkscape
Programming Software
vcpkg
https://github.com/microsoft/vcpkg
https://docs.microsoft.com/en-us/cpp/build/vcpkg?view=msvc-160
.\bootstrap-vcpkg.sh
.\vcpkg integrate install
.\vcpkg install itk boost
Windows
- Environment variable for x64 default
VCPKG_DEFAULT_TRIPLET=x64-windows
Helpful References
Setup
- Windows sandbox
- Type
features
on the Start search bar - Click on
Turn Windows features on or off
- Check
Windows Sandbox
- Click
ok
and restart - A sandbox app should be in your start menu to run a quick instance of windows
- Type
- MATLAB
- Visual Studio Community
- TODO: Get this setup with
choco
orbrew
- Check
Desktop development with C++
- On the right list add:
- Clang
- MFC
- Window 10 SDK
- MSVC v141 and v140
- Add clang to your path
- e.g.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\Llvm\bin
- e.g.
- TODO: Get this setup with
- Git LFS
- Beyond Compare
- GnuWin
- Remember to append the bin directory to your path
- Fork
- vcpkg
- You can set system environment variable
VCPKG_DEFAULT_TRIPLET=x64-windows
to install 64 bit versions by default
- You can set system environment variable
- VScode
- Add the following plugins:
- Bracket Pair Colorizer
- C++
- Code Spell Checker
- GitLens
- LaTeX Workshop
- Make sure you install
LaTeX
andGhostScript
from the Writing Software section
- Make sure you install
- Markdown All in One
- markdownlint
- Python
- Todo Tree
- vscode-pandoc
- Install
pandoc
from Writing Software
- Install
- Write Good Linter
- Make sure you install
Write good
from the Writing Software section
- Make sure you install
- Add the following plugins:
- MiniConda
- Turn off the app installer for python
- Go to
Setting
->Apps
->Apps & features
->App execution aliases
- Turn off all of the python entries
- Go to
- Add a
.condarc
to your home directory with the following (then runconda update conda
):
- Turn off the app installer for python
channels:
- conda-forge
- defaults
Imaging Software
- IrfanView
- Don’t forget the plug-ins too
- Set as default photo viewer in
Settings
->Apps
->Default apps
- Fiji
and the following plugins:
- BigStitcher
- ClearVolume
- HDF5
- N5
- SiMView
Writing Software
- LaTeX
- GhostScript
- Put on path, e.g.
C:\Program Files\gs\gs9.50\bin
- Put on path, e.g.
- Pandoc
- A good LaTeX template for converting markdown to pdf with pandoc
- Write good
- This depends on
nodejs
. See Chocolatey in Programming Software
- This depends on
- LTeX
- This is a VSCode extension that will help with grammar in LaTeX documents.
Terminal General
Install fonts from either:
PowerShell cheat sheet https://www.comparitech.com/net-admin/powershell-cheat-sheet/
Useful Commands
Environment variables dir env: