Linux: Difference between revisions
No edit summary |
|||
Line 44: | Line 44: | ||
==Nvidia== | ==Nvidia== | ||
===Switching between Nvidia and Intel=== | ===Switching between Nvidia and Intel=== | ||
[https://www.linuxbabe.com/desktop-linux/switch-intel-nvidia-graphics-card-ubuntu Reference] | [https://www.linuxbabe.com/desktop-linux/switch-intel-nvidia-graphics-card-ubuntu Reference] <br> | ||
Make sure the Nvidia graphics drivers are installed. Then you can select between Nvidia and Intel GPUs using the Nvidia X Server Settings application <code>nvidia-settings</code>. Alternatively, you can use the following commands in the terminal.<br> | Make sure the Nvidia graphics drivers are installed. Then you can select between Nvidia and Intel GPUs using the Nvidia X Server Settings application <code>nvidia-settings</code>. Alternatively, you can use the following commands in the terminal.<br> | ||
To switch to the Nvidia GPU: | To switch to the Nvidia GPU: |
Revision as of 12:01, 3 October 2019
A collection of notes on using Linux systems, in particular Ubuntu.
SSH
SSH Keys
Generate an ssh-key for every client
ssh-keygen -t ed25519 -a 100 [-C "comment your client name"] [-f output_path]
Some older software such as Solid file explorer require RSA keys in PEM key format
ssh-keygen -t rsa -b 4096 -a 100 -m PEM [-C "comment your client name"] [-f output_path]
You can also convert existing keys to PEM format
ssh-keygen -p -m PEM [-C "comment your client name"] [-f output_path]
Manage ssh keys
# On the client
ssh-copy-id [email protected]
# On the server
vim ~/.ssh/authorized_keys
Notes:
- According to this you should avoid using ECDSA and DSA keys.
Port Forwarding
Also: SSH Tunneling, SSH Proxy, SSH Reverse Proxy
If you need to access a port on the remote computer, you can use the -L
option to forward ports from the remote to the local machine.
ssh -L <localport>:localhost:<remoteport> <remoteurl>
# E.g. ssh -L 8080:localhost:80 [email protected]
You can also do the reverse, giving the remote access to a local port using -R
ssh -R <localport>:host:<remoteport> <remoteurl>
# E.g. ssh -R 8080:localhost:80 [email protected]
Nvidia
Switching between Nvidia and Intel
Reference
Make sure the Nvidia graphics drivers are installed. Then you can select between Nvidia and Intel GPUs using the Nvidia X Server Settings application nvidia-settings
. Alternatively, you can use the following commands in the terminal.
To switch to the Nvidia GPU:
sudo prime-select nvidia
To switch back to the Intel GPU:
sudo prime-select intel
prime-select query
will print either nvidia
or intel
to stdout.