[Linux] Basic use and configuration of Ubuntu, as well as a summary of common problems (1)

foreword

  During college, I felt that many times learning extracurricular knowledge was pushed forward, and many contents were not studied in depth. The record of knowledge was limited by what I had learned. Architecture lacks a process of systematic learning and sorting. This article will take the Ubuntu system as an example to sort out some commonly used operations in the process of using Linux, most of which are also applicable to other distributions. This article will continue to be updated as I learn.

0 FAQ Summary

  Record some problems and solutions encountered in the use of Ubuntu, which will be updated continuously. If there are too many contents, a separate blog will be opened for recording.

0.1 The solution to the broken pip

  Run directly on the terminal pip listor pip3 listreport an errorInvalid Syntax

reference link

0.2 Recovery method of bashrc under Ubuntu

  If you accidentally echo ... > ~/.bashrcoverwrite this file by using it (it should be used normally >>), you can use this command to copy the default file in the system:

cp  /etc/skel/.bashrc   ~/

reference link

0.3 Problems encountered when using gedit

(gedit:125808): Tepl-WARNING **: 18:20:43.436: GVfs metadata is not supported. Fallback 
to TeplMetadataManager. Either GVfs is not correctly installed or GVfs metadata are not
 supported on this platform. In the latter case, you should configure Tepl with 
 --disable-gvfs-metadata.

  After encountering this warning, it seems that the change to the file is invalid, that is, it seems to be changed but there is no change in reality. Later, it seems to be the reason for adding sudo:

insert image description here

1 Selection of virtual machine image

  The first is the selection of the virtual machine image, just like reinstalling the Windows system, you must first choose a good image. My suggestion is to find the original image, which can avoid many problems. Here is the Tsinghua Open Source Software Station :

insert image description here

Moreover, the domestic download speed of these images is very fast.

2 Change the software source

  In the process of using the Linux operating system, in order to enhance the user experience and make the download and installation of the software faster, the source is changed as soon as the system is installed. Similarly, the recommended software source here is Tsinghua source :

insert image description here

The way to replace it in Ubuntu is also very simple, as follows:

# 进入到apt的配置文件夹并查看文件
cd /etc/apt && ls

insert image description here

The software sources of apt are sources.listfiles and sources.list.dfiles in folders. The sources.list folder is empty by default, and users can manually add other software sources.

# 修改软件源
sudo gedit sources.list

Then copy the above Tsinghua software source to this file, and then run sudo apt updatethe update.

Regarding the structure of this software source, those who are interested can refer to this article .

3 Install Chinese input method

  During the development of the Linux system, sometimes when encountering a problem, you may want to directly retrieve the answer in the FireFox browser that comes with the system, but the system does not have a Chinese input method by default, so you still need to toss it yourself.

I found that this article was written quite comprehensively, and it is recommended to read it carefully, so I won't repeat it here.

If it is a CentOS system, you can refer to this article .

4 ssh configuration

  The newly installed Ubuntu does not have ssh, you need to install it:

#安装ssh
sudo apt install ssh

#或者
sudo apt-get install openssh-server

#设置开机启动
sudo systemctl enable ssh

reference link

Guess you like

Origin blog.csdn.net/ZHOU_YONG915/article/details/131843192