LINUX system (ubuntu) installation and application debugging (updated from time to time)

1: Introduction to linux

Linux is an open source (Open Source) operating system based on the UNIX operating system. It was first released in 1991 by Finnish computer scientist Linus Torvalds and has grown to become one of the most popular and widely used operating systems.

Linux is known for its stability, security, and flexibility. Unlike other operating systems, Linux has free distribution and modification rights, which means that anyone can view, copy, modify and distribute the Linux operating system. This allows Linux to evolve rapidly and enjoy broad community support around the world.

Linux has diverse application fields, ranging from personal computers to servers, embedded systems and other devices. Its powerful network capabilities and stable performance make it the operating system of choice for many Internet service providers and enterprises. In addition, Linux is also widely used for sharing and collaboration among scientific research, academia, education, and individual enthusiasts.

The Linux operating system has a rich software library and tools, including graphical user interface (GUI) and command line interface (CLI), which enable users to perform various tasks and operations, such as file management, programming development, network configuration, etc. At the same time, Linux also supports multiple programming languages ​​and development environments, providing developers with a broad application space.

In short, Linux is a powerful, free and open operating system that provides users with a stable, secure and flexible computing environment through continuous development and innovation. Whether you are an individual user or an enterprise, you can get rich features and unlimited possibilities.

2: Linux installation (ubuntu)

  1. Download the Ubuntu image: Go to the Ubuntu official website ( https://ubuntu.com/) to download the Ubuntu image file suitable for your system architecture (32-bit or 64-bit), and select the latest version.

  2. Create a boot disk: Write the Ubuntu image to a boot disk (such as a USB flash drive). You can use tools such as Rufus, Etcher, or Unetbootin to accomplish this task.

  3. Boot to the startup disk: Insert the startup disk into the computer and make sure the computer is set to boot from the startup disk. This usually involves pressing a specific key (such as the F12, Esc, or Delete key) when the computer boots up, and then choosing to boot from the USB device.

  4. Run Live CD/USB: After the computer successfully boots to the startup disk, you will see an Ubuntu boot menu. Select the "Try Ubuntu without installing" option. This will run a temporary Ubuntu system on your computer, allowing you to experience Ubuntu without installing it.

  5. Install Ubuntu: On the Ubuntu desktop, you will find an "Install Ubuntu" icon. Click on it to enter the installer. During the installation process, you will be asked to select settings such as language, time zone, keyboard layout, and more.

  6. Hard drive partitioning: Select partitioning options in the installer. You can choose to use the entire hard drive, or customize the partitioning scheme to install Ubuntu. If you are a new user, it is recommended to select the "Erase disk and install Ubuntu" option, which will use the entire hard disk to install Ubuntu.

  7. Create a user account: During the installation process, you will need to provide some personal information such as username and password, which will be used to log in to the Ubuntu system.

  8. Complete installation: The installer will continue running and complete all necessary tasks. Once the installation is complete, you will be prompted to either restart your computer or continue using your temporary Ubuntu system. Select Restart your computer and remove the startup disk.

  9. Enter Ubuntu: After the computer restarts, you will see a boot menu, select the Ubuntu operating system to enter the login interface. Enter the username and password created previously to enter the newly installed Ubuntu system.

However, virtual machines are generally used to install ubuntu or centos. The specific installation is not described. You can search for installation tutorials.

Three: Solving keyboard failure

Generally speaking, after installing the system and opening the built-in Vi editor to open a file for editing, the keyboard will malfunction. The vim tiny version is pre-installed. This version cannot recognize the direction keys. First, you need to use the built-in VI editor. Make changes.

First, open vi /etc/vim/vimrc.tiny through the command to open the following interface.

Changing "compatible" in the penultimate sentence "set compatible" in the file to " nocompatible " non-compatible mode can solve the problem of the direction keys changing to ABCD. To solve the problem of backspace, add set backspace=2 in the penultimate line as shown below:

Four: apt update

After the Ubuntu installation is completed, update and upgrade operations are usually performed first. The default source is http://us.archive.ubuntu.con/ubuntu  . The update will be slow. You can change it to a domestic source. You can use the command cat / etc/apt/sources.list to view the current apt source.

To replace the source, it is recommended to back up the original file first, cp /etc/apt/sources.list /etc/apt/sources.list_bak or directly mv to modify the name, then create a new /etc/apt/sources.list file, and add Alibaba Cloud’s Copy the source into it.

Then instruct apt update and apt upgrade operations. 

Five: Modification of Linux time zone issue

In some higher versions of Ubuntu such as 18.04, the time zone viewed through the date command is UTC and needs to be changed to China's CST time zone. Execute the command  sudo tzselect and follow the prompts to select Asia (serial number 4), continue to select China (serial number 10), finally select Beijing (serial number 1), and finally select OK (serial number 1).

After configuring, create a soft connection to the time zone.

sudo ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

When the date is executed, it has become Chinese time.

 

Six: Install httpdate 

Execute command: apt-get install htpdate 

You can use the command to start: htpdate -D -s -4   www.baidu.com www.taobao.com www.sina.com

Add htpdate to the auto-start. In the /etc/default directory, modify the parameters of htpdate.

 

 

 

Guess you like

Origin blog.csdn.net/qq_19294353/article/details/131492393