Setting up a new Install

Table of Contents

Update System

Update System

sudo apt update
sudo apt upgrade

Oh My Zsh

Set up Zsh First

Setting up zsh

https://github.com/robbyrussell/oh-my-zsh/wiki/Installing-ZSH

sudo apt install zsh
chsh -s $(which zsh)

on chrome book with Crostini

sudo chsh -s /usr/bin/zsh $USER

exit and start shell again

Oh My Zsh time

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

https://github.com/robbyrussell/oh-my-zsh

to adjust settings if you don't already have a config setup

install the powerline fonts

if on windows with wsl then

git clone https://github.com/powerline/fonts.git
# install
cd fonts
./install.ps1

you will need to change the font by click on the top left of window and then selecting a powerline font

else on Linux

sudo apt install powerline-fonts

or if that doesn't work…

# clone
git clone https://github.com/powerline/fonts.git --depth=1
# install
cd fonts
./install.sh
# clean-up a bit
cd ..
rm -rf fonts

Vim

Vim is already installed.

but if it is not

sudo apt-get update
sudo apt-get install vim

or

git clone https://github.com/vim/vim.git
cd vim/src
make
sudo make install

curl or copy your .vimrc

add Plug (vim package manager)

curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
     https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

from with in vim :PlugInstall

Spacemacs

First add emacs

Linux

sudo apt install emacs

Chromebook

On chrome book with Crostini I have found that using nix is the easiest way of installing the latest version of emacs.

sudo apt install xz-utils
curl https://nixos.org/nix/install | sh
nix-env -i emacs

Add script it tells you to run to your shell config file.

Windows

Emacs Windows Instructions

Can download folder unzip into ~/Programs and then add the bin folder to the PATH environment variable.

Add the following Environment Variables:

Name Value
HOME c:\Users\username
ALTERNATE_EDITOR c:\path\→\runemacs.exe

Create a Shortcut Emacs shortcut Daemon

Use this code for a desktop/task-bar shortcut. Right-click in a file folder, select New → Shortcut, and enter:

c:\path\to\emacs\bin\emacsclientw.exe -c -n -a runemacs.exe

This shortcut will connect to Emacs daemon if it is running, otherwise opens a new frame.

-c tells emacs to create a new frame instead of trying to use an existing frame.
-n means no wait - don't wait for the server to return
-a EDITOR specifies to the emacsclientw.exe which editor to run if emacs.exe is not running. An empty string starts a new server if needed

then add spacemacs

and use the develop branch

git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
cd .emacs.d
git checkout develop

or just

git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d -b develop

curl .spacemacs file

tmux

may already be installed but if not

sudo apt install tmux

reloading tmux config https://sanctum.geek.nz/arabesque/reloading-tmux-config/

node

we are going to use nvm

mkdir ~/.nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash

wsl extras

Linux files for a running WSL distro are located at \\wsl$\<distro_name> from windows and act like a network drive.

to find ip of wsl local host

ip addr | grep eth0

Convert Windows paths to wsl and vise versa

wslpath -u ~

Produces /mnt/c/home/jonas

wslpath -w ~

Produces \\wsl$\Ubuntu\home\jonas

git

store credentials

git config credential.helper store

git config user.email "example@email.com

Installing dotnet & PowerShell on Chromebook (Debian 9)

Install dotnet for your version

Register M$ key and feed

https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-manager-debian9

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
wget -q https://packages.microsoft.com/config/debian/9/prod.list
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list

Install dotnet core SDK

sudo apt-get update
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sdk-3.1

Install asp.net core runtime

sudo apt-get update
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install aspnetcore-runtime-3.1

Install dotnet core runtime

sudo apt-get update
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-runtime-3.1

Add tab completion to zsh

https://docs.microsoft.com/en-us/dotnet/core/tools/enable-tab-autocomplete

# zsh parameter completion for the dotnet CLI

_dotnet_zsh_complete()
{
    local completions=("$(dotnet complete "$words")")

    reply=( "${(ps:\n:)completions}" )
}

compctl -K _dotnet_zsh_complete dotnet

Hello World Console app

dotnet new console
dotnet run

Add PowerShell Core

https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7

dotnet tool install --global PowerShell

Add the dotnet tools directory to your path in your .zshrc file.

export PATH=$HOME/.dotnet/tools:$PATH

Then either restart your shell or use:

source ~/.zshrc

To start PowerShell type pwsh.