Skip to content

Instantly share code, notes, and snippets.

@DaddyMoe
Last active December 31, 2020 14:41
Show Gist options
  • Save DaddyMoe/6be8138c6f62792fc2a240c5d35f4844 to your computer and use it in GitHub Desktop.
Save DaddyMoe/6be8138c6f62792fc2a240c5d35f4844 to your computer and use it in GitHub Desktop.
Linux Development Environment Setup for Java and React/JS Engineering

Linux development Environment setup

Install SDKs, e.g. java via SDKMan

You may also need development tools to build native addons:

 sudo apt-get install gcc g++ make

To install the Yarn package manager, run:

 curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
 echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
 sudo apt-get update && sudo apt-get install yarn

IDEs Editor:

Install Docker

Commands used from the two guides above

sudo apt-get update

sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common


curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -


#  Verify that you now have the key with the fingerprint 9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88, by searching for the last 8 characters of the fingerprint.
sudo apt-key fingerprint 0EBFCD88


# Adding Docker repository

## Next thing is to add Docker repository to Linux Mint. The variable ‘$ (. /etc/os-release; echo “$ubuntu-codename”)’ ensures that you are using the right distribution of your Linux Mint
#  This is what fixes the official guide
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(. /etc/os-release; echo "$UBUNTU_CODENAME") stable"

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io


# Verify Docker Installation
sudo docker --version

# Verify that Docker Engine is installed correctly by running the hello-world image.
$ sudo docker run hello-world


# Add user to docker group to avoid having to use sudo with docker commands
sudo usermod -aG docker $USER

# Check groups
groups

# If docker is not listed either restart or run the following and recheck groups
newgrp docker

Issues

Battery

My Surface pro 7 does not seem to be recognised by the default battery management utilities.
Working on various ways to resolve this.

Tried:

So far

  1. Following this guide here in installing TLP but, unfortunately it does not support Surface Pro 7.

See out put of sudo tlp-stat below:

+++ Battery Features: Charge Thresholds and Recalibrate
natacpi    = inactive (no kernel support)
tpacpi-bat = inactive (laptop not supported)
tp-smapi   = inactive (laptop not supported)

+++ Battery Status
No battery data available.

Consider removing TLP! Look for another alternative

  1. Use ACPI

https://www.2daygeek.com/check-laptop-battery-status-and-charging-state-in-linux-terminal/

$ acpi
No support for device type: power_supply
  1. Installed Slimbook battery optimizer

  2. Installed Laptop-mode-tools. Not sure how to verify this is work. So removing in favour of the above SlimBook.

  3. Kernal not supported

Goolging around reveal that it is the kernal that does not have support for my Surface Pro 7

TODO:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment