docker --version
systemctl start docker
To expose a port, run the following command along with other commands below:
-p <host_machine_port_that_is_free>:<docker_image_port_to_expose>
- Example:
docker run -t -d -p 3000:27017 --name myCustomImage debian
docker pull <os_name>
docker run -t -d --name <image_name> <os_name>
docker ps -a
docker exec -it <image_name> /bin/sh
docker stop <image_name>
docker start <image_name>
docker stats
docker image
docker image ls
docker rm -f <image_id>
docker ps -a
docker inspect <container_name> | grep IPAddress
docker commit <container_id> <docker_useraname>/<repository_name>:<version_name (use:- latest)>
docker push <docker_useraname>/<repository_name>:<version_name>
docker images
docker image rm --force <docker_commit_image_id>
xhost +
docker run -t -d --net=host --env="DISPLAY" --volume="$HOME/.Xauthority:/root/.Xauthority:rw" --name test debian
apt update -y && apt upgrade -y && apt --fix-broken install && apt autoremove -y && apt install systemd -y
apt-get install libgtk2.0-dev -y
apt --fix-broken install
apt-get install python3-pip python-dev -y
apt install wget -y && apt install fish -y && apt install nano -y && apt install curl -y && apt install vim -y
apt install nodejs -y && apt install npm -y && npm cache clean -f && npm install -g n && npx n stable && hash -r && node --version
To make fish default shell, first run: which fish
Then take the output of the command above and type this: chsh -s <command_from_the_step_above>
When running a .sh file, add this to the top: #!/bin/sh
tmux attach -t 0
- Navigate around all windows & sessions --
ctrl+B, W
- Overview of all windows & sessions --
ctrl+B, S
- Delete a window from the navigation --
ctrl+B, X
- New window --
ctrl+B, C
- Change window --
ctrl+B, N
- Change window name --
ctrl+B, ,
- Delete a window --
ctrl+B, &
- Detach --
ctrl+B, D
- Split vertically(hotdog) --
ctrl+B, %
- Split vertically(hamburger) --
ctrl+B, "
- Move around --
ctrl+B, ↑ ↓ → ←
- Move around --
ctrl+B, Q
- Move around --
ctrl+B, NUMBER
- Change size of panel --
ctrl+B, ctrl+↑ ↓ → ←
- Pre-selected layouts --
ctrl+B, alt+NUMBER
- Delete a panel --
ctrl+B, X
- List all sessions --
tmux ls
- Start session --
tmux new -s nameHere
- Start session & window --
tmux new -t nameHere
- Kill session --
tmux kill-session -t nameHere
- Change session number
rename-session -t [old-number] [new-number]
- Prevent SSH session from freezing: StackExchange Answer
- Increase nginx file upload size: StackOverflow Answer
- Open port OCI instance: StackOverflow Answer
- Upload & Download files to and from your server: SuperUser Answer
- To run commands on startup: StackExchange Answer
How to download files using cli: wget -O [file name with extension] [url]
- Example:
wget -O filename.html googl.com
Copy files between host and container: docker cp [souce dir] [containerID]:[docker dir to copy to]
- Example:
docker cp '/home/atharvavyas/Downloads/data.csv' 'abc123:/home/'
- Hit:
Ctrl+Shift+P
to open command palette - Search: "Remote: Install Local Extensions" and select the first option
- Select all extensions, and click OK; Then wait for all the extensions to install
conda create --name <name_for_your_env> python=<python_version>
conda activate <your_env>
conda info --envs
conda install <package_name> (like tensorflow, requests, etc.)
conda remove <package_name>
conda deactivate
conda env remove -n <your_environment_name>
- StackOverflow Answer 1
source ~/miniconda3/etc/profile.d/conda.sh
- StackOverflow Answer 2
conda init fish
- StackOverflow Answer 3
conda config --set auto_activate_base false
pyenv install 3.10.0
pyenv virtualenv 3.10.0 myproject
pyenv activate myproject
which python
which pip
pyenv virtualenv-delete <name_of_your_env>
pyenv versions
Just use:
sudo apt install python3-nautilus
killall nautilus
and reopen nautilus, then right click to see the option.