Skip to content

Instantly share code, notes, and snippets.

@format37
Last active November 22, 2022 09:44
Show Gist options
  • Save format37/f484f683780a79062c54241dab2b7046 to your computer and use it in GitHub Desktop.
Save format37/f484f683780a79062c54241dab2b7046 to your computer and use it in GitHub Desktop.
Linux shell samples

Linux shell samples

Useful linux shell commands and scripts

Github repository address

git remote -v | grep fetch

Invert display colors

sudo apt install xcalib
xcalib -invert -alter

Network speed monitoring

sudo apt-get install iftop

nvme temp and stats

sudo apt-get install nvme-cli
sudo nvme smart-log /dev/nvme0

mount

cifs install

sudo apt install cifs-utils

nfs-common install

sudo apt-get install nfs-common

mount to client

sudo mount.cifs //10.2.4.254/Rec_Call_To_1C/ /mnt/share/audio_master/ -o user=1CUser,pass=YOURPASS,vers=1.0

or

sudo mount -t cifs -o uid=$(id -u),gid=$(id -g),forceuid,forcegid, //192.168.1.11/storage/alex /home/alex/rig1/

yandex cloud compute vm connection

follow instructions: https://cloud.yandex.ru/docs/compute/operations/serial-console/
or
after key generation

ssh-keygen -t rsa -b 2048

paste your .pub key in VM creating page

eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa_yandex_cloud_kaggle

and simply connect ssh

ssh alex@my.pub.ip.addr

install jupyter

python3 -m pip install notebook

to grant to select conda environments as core of jupyter notebook
https://ipython.readthedocs.io/en/stable/install/kernel_install.html#kernels-for-different-environments

conda install nb_conda
source activate myenv
conda install pip
conda install ipykernel # or pip install ipykernel
source activate myenv
python -m ipykernel install --user --name myenv --display-name "Python (myenv)"
jupyter notebook

repair jupyter

export PATH=$PATH:~/.local/bin/

drive space instruments

gui 0

sudo apt-get install gdmap

gui 1

sudo apt-get install baobab

terminal 0

apt-get install ncdu
ncdu /

ssh

Too many authentication failures

nano ~/.ssh/config
# set IdentitiesOnly=yes:
Host * 
       	IdentitiesOnly=yes

List of system services

systemctl list-unit-files | grep enabled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment