Linux Dev Environment
These instructions may apply to any distribution.
Sudo errors
If you’re getting errors when trying to use sudo, you should add your user to sudoers. Open terminal, run these commands and restart your machine:
su -
usermod -aG sudo username
Software
Git
Terminal
- Install zsh
- Run command:
zsh
- Install and run Powerlevel10k
- Set it as your default shell:
usermod --shell /usr/bin/zsh root usermod --shell /usr/bin/zsh YOUR_USERNAME
To re-run the setup:
p9k_configure
VS Code (VSCodium)
- Install VSCodium
-
Set VSCode/Codium as default editor. more info
xdg-mime default codium.desktop text/plain # If you're using code instead of codium xdg-mime default code.desktop text/plain
GitHub Desktop
- Repository.
- Install with dnf on Fedora.
- Install with apt or download .deb on Debian / Ubuntu (on KDE right click run with Discover)
- Use app-image on arch.
-
If you’re working with Windows users:
git config --global core.autocrlf input
NodeJS and NPM
Install NVM.
nvm install 14
nvm use 14 (OPTIONAL STEP)
Docker
Add your user to docker group and restart:
su -
usermod -aG docker username
Rider
Install with tool-box:
If your project has NPM tasks with msbuild (if NPM INSTALL fails during compilation), run Rider using a terminal with NPM access. For example: left click on Rider search for Application > Command run. Copy and run it:
/home/equilaterus/.local/share/JetBrains/Toolbox/apps/Rider/ch-0/213.6775.4/bin/rider.sh
To avoid repeating the previous step, create a file rider.sh at /home with the following content:
#!/bin/bash
echo 'Running Rider...'
# Copy your Rider command....
sh /home/equilaterus/.local/share/JetBrains/Toolbox/apps/Rider/ch-0/213.6775.4/bin/rider.sh
Next time, open a console and type:
sh rider.sh
Dotnet core
- Installation Fedora
- Installation Debian
- Instalation Arch
- Snaps can have problems when running web-apps.
If you have multiple versions of dotnet core, create a file global.json in the same location as this readme with the following contents:
{
"sdk": {
"version": "3.1.417"
}
}
Replace the version with a 3.1.x installed on your machine. To see your SDKs:
dotnet --list-sdks
If you have trouble with dotnet ef after installing it, use the following command:
export PATH="$PATH:$HOME/.dotnet/tools/"
To fix certificates error run:
dotnet dev-certs https
You’ll still have to configure trust certificates or access your page as unsecure resource from your web browser. As it is a dev env, you can safely access it as an unsafe site.
Powershell
- Install Fedora
- Install Debian
- Install Arch untested.
If you prefer, you can install it as a dotnet tool (but previous methods are better):
dotnet tool install --global PowerShell
After that use pwsh to start powershell.
For dotnet core 3.1:
dotnet tool install --global PowerShell --version 7.0.9
For other versions check: nuget package
SQL Server with Docker
Summary:
# Download SQL Server image
sudo docker pull mcr.microsoft.com/mssql/server:2019-latest
# Create and run sql1 container
sudo docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=testdb123*" \
-p 1433:1433 --name sql1 --hostname sql1 \
-d mcr.microsoft.com/mssql/server:2019-latest
# Start container
docker start /sql1
# Delete container with DB
docker rm /sql1 -f
Connection string:
string _connString = "Server=localhost,1433;Database=Master;User Id=SA;Password=testdb123*";
Fedora flatpaks
Dropbox:
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub com.dropbox.Client
Steam:
sudo dnf install https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install steam
Equilaterus (CC-BY) 2018 - 2022.