Ubuntu General Instructions

1. Enter the terminal

Enter the terminal:Ctrl + Alt + T
Delete the folder: sudo rm -r xxx
Enter super user privileges:sudo su
View the files under the folder File and folder directory status: ls -lh
View hidden file directory information, ls -a
Open the file: sudo gedit ~/.xxx
View Ubuntu version: cat /etc/issue
Insert image description here

2. Ubuntu source change

Ubuntu Tsinghua University mirror source: https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/
The default server of Ubuntu is overseas, so downloading is slow and requires Change the domestic image source:
Check the current Ubuntu version and find the source of the corresponding version in the Tsinghua University image source:
Insert image description here
cd /etc/apt/Enter the APT directory a>
cp -a sources.list sources.backup.list Save the backup of sources.list as sources.backup.list to prevent replacement when necessary.
sudo gedit sources.listOpen sources.list
Clear the content in sources.list, paste the image source just copied, and save:
Insert image description here

sudo apt-get updateUpdate the mirror source successfully:
Insert image description here

3. Ubuntu changes the display of Chinese and Chinese input methods

Ubuntu changes to Chinese display, change directly in settings:
Insert image description here
Chinese input method settings:
1. Open the terminal and enter 4. Select the Simplified Pinyin input method and enter to install 3. Due to Ubuntu Desktop You are using the GNOME desktop, so you need to install the corresponding platform support package. Enter command to switch the framework 2. After the installation is complete, enter the sudo apt install ibusInstall the framework 5. After completing the installation, add the Chinese input method to the input source options: 6. Use super+space to perform the current input method switching.
im-config -s ibus
sudo apt install ibus-gtk ibus-gtk3
sudo apt install ibus-pinyin

Insert image description here

4. Download Anaconda in Ubuntu

Method 1 Manual download from web page:

Use the firefox browser in the Ubuntu system to enter the Anaconda official website: https://www.anaconda.com/
(You can also download it in Windows and copy it to Ubuntu ( As long as VMware Tools is installed))
Insert image description here
Right-click in the folder where the current file belongs to open the terminal and enterbash bash Anaconda3-2023.03-1-Linux-x86_64.sh

Insert image description here

Method 2: Download with wget command:

In Linux, the wget command is a commonly used tool for downloading files from the Internet. It supports HTTP, HTTPS and FTP protocols and can specify files to download via URL.
Use wget to download the installation package
wget https://repo.anaconda.com/archive/Anaconda3-2021.11-Linux-x86_64.sh
Or use bash to install, the directory location of the bash+ installation package:
bash ~/Downloads/Anaconda3-2023.03-1-Linux-x86_64.sh

After completing the above two methods, the following steps are the same:
Enter yes and press the Enter key. Press Enter to select the default installation directory (by default, a folder named anaconda3 is created in the user's home directory as the installation address)

Insert image description here
The last step is to initialize Anaconda. In this step, you only need to enter yes according to the prompts. The interface is as follows:
Insert image description here
Insert image description here
PS:
Insert image description here

If you do not want conda's base environment to be activated on startup, set the auto_activate_base parameter to false:
conda config --set auto_activate_base false
Insert image description here

5. Anaconda configures Pytorch environment

Download the Linux version of pytorch file locally from Tsinghua mirror source
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/linux-64/?C =M&O=A
Downloaded, copy from Windows to Ubuntu:
Insert image description here
Open the terminal in the current folder, conda activate baseActivate conda’s base environment.
Add Tsinghua mirror source:

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/

sudo gedit ~/.condarcOpen the image source file to manage the added image.
Insert image description here

6. Install and uninstall Pycharm on Ubuntu

Install

Finished downloading the Linux version of pycharm.
Insert image description here
First enter the bin file of the installation package:

cd pycharm-community-2023.1.3
cd bin

Insert image description here
Finally, open Pycharm.

sh ./pycharm.sh

Insert image description here

uninstall

Find the pycharm folder that you unzipped at that time. I unzipped it under /usr/;

Use the command:ls -lh to view the files and folders in the folder, as shown below:
After finding the pycharm folder, Enter the command: sudo rm -r pycharm to delete.
After reaching this step, it has not been completely uninstalled, and there is still the configuration environment of pycharm.
Because generally after installing pycharm, a hidden file directory will be created in the home directory to view the hidden file directory information, ls -a.
After finding the file directory, enter the command: rm -r ~/.PyCharm2021.3/ OK,

Use the command again: ls -a to check and find that it has been completely deleted.

Guess you like

Origin blog.csdn.net/weixin_50557558/article/details/131525887