Skip to content

Latest commit

 

History

History
471 lines (262 loc) · 15.3 KB

02.linux-related-nowledge.md

File metadata and controls

471 lines (262 loc) · 15.3 KB

Linux Related Knowledge

In this Gist Sebastian Monta shares various solutions and use-cases he experienced while working with Linux.

  1. Some useful Linux apps
  2. System information
  3. Managing Linux services
  4. OS level tweaks
  5. File Permissions & Ownership
  6. Web browsers related
  7. Supportive tools & services
  8. CLI Tweaks

   

Some useful Linux apps

Viewer and editor of applications internal settings

Some Dock config pathes

If Dash to Panel extension used, ignore following

Action when double-click on a running app

/org/gnome/shell/extensions/dash-to-dock/middle-click-action

Suggested: 'quit' | default: 'launch'

Action when click on a running app

/org/gnome/shell/extensions/dash-to-dock/click-action

Suggested: 'minimize' | default: 'focus-or-previews'

Action when shift+clicking on a running app

/org/gnome/shell/extensions/dash-to-dock/shift-click-action

Suggested: 'previews' | default: 'launch'

Action when scrolling a dock

/org/gnome/shell/extensions/dash-to-dock/scroll-action

Suggested: 'do-nothing' | default: 'switch-workspace'

   

Code editing. Redefined. Free. Built on open source. Runs everywhere.

Installation steps for Linux

Download custom configuration by Sebastian Monta: settings.json

   

Web browser. Browse privately. Search privately.

Installation steps for Linux (Debian, Ubuntu and Mint)

   

Develop faster. Run anywhere.

Installations steps:

  1. Install Docker Engine on Ubuntu
  2. Docker Engine post-installation steps

   

Coding at lightspeed.

Install Lando - /bin/bash -c "$(curl -fsSL https://get.lando.dev/setup-lando.sh)"

Lando config

Set channel + Make the "unsupported docker" warning less obtrusive:

Open ~/.lando/config.yml & add / modify:

channel: none dockerSupportedVersions: engine: satisfies: '>22' tested: '>22'

Original config: https://github.com/lando/core/blob/main/config.yml

   

Sophisticated text editor for code, markup and prose.

Instruction how to install & activate theme

GitHub themes for Sublime Text

   

App to view and clean metadata in files.

Sometimes files downloaded from internet contains a lot of dirty metadata.

   

Music player. Super lightweigth (written in C). Actively maintained.

   

System information

The trusted source for IP address data

Allows to get ip, provider hostname & org, region, country, location, limezone in CLI

Ensure we really get JSON, and not the IPinfo homepage HTML:

curl ipinfo.io/json

curl -H "Accept: application/json" ipinfo.io

   

Get System Hardware Information

sudo dmidecode --type

sudo dmidecode -s

Other examples / approach of usage

sudo dmidecode --type memory

sudo dmidecode --string baseboard-product-name

   

Wireless tools for Linux

iwconfig

   

A Powerful Feature-Rich Command-line System Information Tool for Linux

Install:

sudo apt install inxi

inxi -Fxz

   

Command line interface to configure monitor (View info, Resize, Rotate and more)

Get Display sizes (x & y axis in mm):

xrandr --query | grep -w 'connected'

   

Managing Linux services

A tutorial on how to remove Snap from Ubuntu Linux and getting a snap-free system.

Tutorial inculde Firefox installation (without snap).

   

Set stronger disablement for bluetooth service, uninstall bluetooth app.

Basically following 3 commands:

sudo service bluetooth stop
sudo systemctl disable --now bluetooth.service
sudo systemctl mask --now bluetooth.service

   

Restart a network without needing to restart the PC.

Two valid commands (excerpts from an article):

sudo systemctl restart NetworkManager.service

sudo nmcli networking off && sudo nmcli networking on

   

OS level tweaks

Enable Quick Preview

Click on the file and hit Space to preview it.

sudo apt install gnome-sushi

Change shutdown default timeout.

Quick fix:

sudo xdg-open /etc/systemd/system.conf

Change #DefaultTimeoutStopSec=90s to DefaultTimeoutStopSec=5s

   

Tutorial will instruct how to modify & overwrite:

hiddenmenu: Option that hide / show GRUB’s boot menu

timeout: GRUB’s timeout option (in seconds)

default: GRUB’s default option - specify default boot (OS)

Edit GRUB file

sudo gedit /etc/default/grub

If you change this file, run sudo update-grub afterwards to update

   

1st - Install Gnome shell & extension itself:

sudo apt install chrome-gnome-shell gnome-shell-extension-prefs

2nd - Add GNOME Shell integration extension to Firefox

Explore via extensions-next    

This extension moves the dash into the gnome main panel so that the application launchers and system tray are combined into a single panel.

Dash to Panel preview

Download & import following dash_to_panel.config file into Dash to Panel extension

   

Allow setting the keyboard backlight brightness with a slider in the main menu

Keyboard Backlight Slider preview

   

Button in panel: switch between global dark and light themes.

Warning: Not maintained anymore

   

Adds icons to the desktop. Fork of the original Desktop Icons extension, with several enhancements.

   

Converts to grayscale the entire Gnome workspace by using a smooth transition. Suggest to use during evening/night.

   

Command line utility for saving laptop battery power without the need to delve deeper into technical details.

Article Quickly Increase & Optimise Linux Laptop Battery Life ( Practical usage of TLP Battery Management Tool in Linux)

Note: Sebastian Monta is not using TLP [right now], he trusts Ubuntu

   

File Permissions & Ownership

chmod

Change the access permissions and the special mode flags of file system objects

Example

sudo chmod -R 753 /some path

Numbers explained

1st Number 7 - Read, write, and execute for the user

2dn Number 5 - Read and execute for the group

3rd Number 3 - Write and execute for others

   

Info table about numbers
Number Description ls Binary
0 No permissions at all --- 000
1 Only execute --x 001
2 Only write -w- 010
3 Write and execute -wx 011
4 Only read r-- 100
5 Read and execute r-x 101
6 Read and write rw- 110
7 Read, write, and execute rwx 111

   

chown

Change the owner of file system files, directories

sudo chown -R $USER /some_path

   

Web browsers related

Setting up different search engines for Firefox browser.

Just open Search engines link and follow instructions to add search engine You prefer.

   

Supportive tools & services

Installer for Microsoft TrueType core fonts (Arial, Courier New, Georgia, Times New Roman, Trebuchet, Verdana, etc) to be available in other apps.

Install:

sudo apt-get install ttf-mscorefonts-installer

   

CLI Tweaks

Download .zshrc by Sebastian Monta to configure shell scripts (zsh). Place it in Your $HOME directory.

Follow further steps for setting up neat CLI interface.

   

A powerful and customizable terminal emulator

install:

sudo apt install konsole

Konsole Themes & user Profiles install path

~/.local/share/konsole

Download Materia Light KDE theme directly - Materia.colorscheme

Download pre-configured user profile for Konsole: ValtersZana.profile

Fira Code - Monospaced font that render ligatures (character sequences). Ubuntu installation: sudo apt install fonts-firacode

   

Framework for managing your zsh configuration.

Prerequisite (zsh, curl / wget, git):

sudo apt install zsh curl wget git ruby

Ruby will fix some scm breeze alias further.

Basic Installation:

  1. sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Updates: By default, you will be prompted to check for updates every 2 weeks.

   

Minimalistic, powerful and extremely customizable ZSH prompt.

Spaceship Prompt Used in CLI (terminals / command-line tools).

Basic Installation & update steps:

  1. git clone https://github.com/spaceship-prompt/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" --depth=1

  2. ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"

   

Set of shell scripts (for bash and zsh) that enhance your interaction with git.

Basic Installation steps:

  1. git clone https://github.com/scmbreeze/scm_breeze.git ~/.scm_breeze

  2. source ~/.zshrc

  3. [ -s "$HOME/.scm_breeze/scm_breeze.sh" ] && source "$HOME/.scm_breeze/scm_breeze.sh"

Update SCM Breeze: update_scm_breeze

Git global config

git config --global push.autoSetupRemote true

git config --global push.default current

git config --global core.editor "subl --wait"

git config --global user.email "may@domain.com"

git config --global user.name "Firstname Lastname"