It is recommended to minimize the installation of Ubuntu system, and eliminate unnecessary software!

Ubuntu mirror

For APT acceleration. First, select the configuration for your Ubuntu version,

  • Ali source
  • Tsinghua source

/etc/apt/sources.list:

sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
sudo vi /etc/apt/sources.list

sudo apt update
Copy the code

Chinese input method

  1. Open theSettingsRegion & LanguageOn the configuration page, clickManage Installed LanguageThe pop-upLanguage Supportwindow
  2. inLanguage SupportWindow, clickInstall/Remove LanguagesTo check theChinese (simplified)ApplyInstall the language
    • Keyboard Input method systemIBus
  3. Go back toRegion & LanguageConfiguration page,Input SourcesClick on+, the choice ofChineseChinese (Intelligent Pinyin)complete
  4. Open theSettingsDevices KeyboardConfiguration page, which can be modifiedTypingShortcuts. The defaultSuper+SpaceSwitch input.
    • Chinese (Intelligent Pinyin)ShiftSwitch between Chinese and English.

For exFAT drive

Removable hard disks in exFAT format are supported. ExFAT for macOS, Windows read and write; File and partition size up to 128PB.

sudo apt install exfat-fuse exfat-utils
Copy the code

Necessary software development

Some tools to install when minimizing system installation:

# ifconfig
sudo apt install net-tools
Copy the code

Development, some software necessary to install:

sudo apt install build-essential cmake git
Copy the code
  • Visual Studio Code on Linux

SSH configuration

Enable SSH service on remote machine:

Install service
sudo apt install openssh-server
# Start service
sudo service ssh start
# Check service
ps -aux | grep ssh
Copy the code

To log in without password, copy the public key into ~/.ssh/authorized_keys. Or, write the local machine to the remote machine:

SSH - copy - id - I ~ /. SSH/id_rsa pub [email protected]Copy the code

Add SSH private key to local machine

If not, generate the secret key
Private key id_rsa Public key id_rsa.pub
ssh-keygen -t rsa -C "[email protected]"

~/.ssh/
mkdir -p ~/.ssh/
mv id_rsa ~/.ssh/
chmod 600 ~/.ssh/id_rsa

# Add to ssh-agent
ssh-add ~/.ssh/id_rsa

# Test is successfulSSH -t [email protected]Copy the code

Configure ~/. SSH /config to set Host nicknames, such as for GitHub multiple accounts:

Host github.com
  HostName github.com
  PreferredAuthentications publickey
  IdentityFile ~/.ssh/id_rsa
Copy the code

Screen sharing

Settings > Sharing > Screen Sharing, enable Screen Sharing.

This option does not exist when the system minimizes installation, or in some embedded versions of Ubuntu, you need to install:

Install service
sudo apt install vino

# Enable service
/usr/lib/vino/vino-server

SSH login to enable the service
/usr/lib/vino/vino-server --display=:0
Copy the code

Disable require-encryption before you can log in to macOS Screen Sharing:

# sudo apt install dconf-editor
sudo apt install dconf-tools
dconf write /org/gnome/desktop/remote-access/require-encryption false
Copy the code

Remmina client software is available for Ubuntu, VNC access to remote desktop:

sudo apt install remmina remmina-plugin-vnc
Copy the code

Screen recording

  • Kazam: Screen recording
  • HandBrake: Format conversion

Because Kazam recording format in other platforms may have problems, such as wechat. Use HandBrake to convert to MPEG-4 and then share.

sudo apt install kazam handbrake
Copy the code

Desktop optimization

You can optimize or customize your GNOME desktop with Tweaks. Its extension is visible at extensions.gnome.org.

sudo apt install gnome-tweaks
Copy the code

Nvidia drivers

If N cards are used, install the Nvidia driver. It is recommended to use the graphics Drivers PPA:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
Copy the code

If you want to install CUDA Toolkit, check CUDA Compatibility first. When installing THE CUDA Toolkit, pay attention to the driver version carried by the Toolkit. You are advised to install the CUDA Toolkit and its driver separately. And the driver from the official directly to find the appropriate version.

Viewing Driver Information

Settings > Details > About, Graphics: View the Graphics driver

$ubuntu - drivers devices = = / sys/devices/pci0000:00/0000:00:14. 3 = = modalias: pci:v00008086d000006F0sv00008086sd000002A4bc02sc80i00 vendor : Intel Corporation manual_install: True driver : backport-iwlwifi-dkms - distro freeCopy the code
$lspci | grep -i VGA 00:02. 0 VGA compatible controller: Intel Corporation Device 9BC4 (Rev 05) 01:00.0 VGA Compatible Controller: NVIDIA Corporation Device 1F15 (Rev A1) $LSPCI-V-s 01:00.0 01:00.0 VGA Compatible Controller: NVIDIA Corporation Device 1F15 (Rev A1) $LSPCI-V-S 01:00. NVIDIA Corporation Device 1f15 (rev a1) (prog-if 00 [VGA controller]) Subsystem: Device 1d05:1097 Flags: bus master, fast devsel, latency 0, IRQ 159 Memory at c5000000 (32-bit, non-prefetchable) [size=16M] Memory at b0000000 (64-bit, prefetchable) [size=256M] Memory at c0000000 (64-bit, prefetchable) [size=32M] I/O ports at 6000 [size=128] Expansion ROM at c6000000 [disabled] [size=512K] Capabilities: <access denied> Kernel driverin use: nouveau
  Kernel modules: nvidiafb, nouveau
Copy the code

Install the Nvidia driver

apt-cache search nvidia | grep ^nvidia-driver

sudo apt install nvidia-driver-440
Copy the code

View Nvidia driver information

$ nvidia-smi Fri Apr 17 07:31:55 2020 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 440.82 Driver Version: 440.82 CUDA Version: 10.2 | | -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - + -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - + -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + | GPU Name Persistence -m | Bus - Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 GeForce RTX 2060 Off | 00000000:01:00. Off | 0 N/A | | 40 c P8 5 w/N/A N/A | 263 mib / 5934 mib | 3% Default | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 1560 G /usr/lib/xorg/Xorg 144MiB | |  0 1726 G /usr/bin/gnome-shell 76MiB | | 0 2063 G ... uest-channel-token=10544833948196615517 39MiB | +-----------------------------------------------------------------------------+Copy the code
# after reboot
$ nvidia-settings
Copy the code

GoCoding personal practice experience sharing, can follow the public account!