Resolution setting and VIM color scheme in Linux

Source: Internet
Author: User

I have learned some configuration items in Linux over the past two days. Now I will record the learning process for your convenience. I would like to thank my colleagues for their guidance ~.

System Environment: Linux Debian

I. Su, sudo

After Linux is installed, we often need to use the permission switch command Su, sudo. The difference between the two commands is:

By default, after Linux is installed, the su command is run. "Su" indicates switching users from average users to administrator users.

The sudo command must be installed before it can be used. sudo: assign an administrator permission to the current general user and then execute the command to be executed.

Install the sudo command: First switch to the administrator user, and then apt-Get install sudo

Ii. modify resolution 800*600 = "1024*768

First clear knowledge points:
Hwinfo: a professional system information tool that supports the latest technologies and standards. Allow you to check all the hardware of your computer. It can display the processor, motherboard and chipset, PCMCIA Interface, BIOS version, memory, Etc ..
Fbset sets the frame buffer. The fbset command can be used to set the size of the frame buffer, adjust the screen resolution, position, height, width, and depth, and determine whether to enable the hardware features of the first card.

1: Installation
Go to the Linux Shell Command Line and enter the command: sodu apt-Get install hwinfo fbset
(When entering this command line, make sure that the sodu command is already installed in the system. Otherwise, switch to the Administrator command: su)
There is a place to insert the optical drive during the installation process. In the case of 99%, the virtual optical drive is loaded.

3: After installation, run the following command: sudo hwinfo -- framebuffer to view the system information, including the resolution supported by the system.
The resolution corresponding to model 0x0317 is 1024*768 16bit.
If this record exists, your computer supports 1024*768 resolution.

4: Enter the boot program of the Linux system and modify the resolution at startup.
Command: sudo Vim/etc/default/GRUB (grub is the Bootstrap program)
Use Vim to open the file and modify quiet VGA = 0x0317

In this way, the Linux Startup will have a resolution of 1024*768.

5: The modified file must be updated and submitted.
Command: sudo Update-grub

Then restart the system and complete the settings.

3. Change the vim color scheme in Linux

Knowledge points to be clarified:

Linux is a multi-user system. Different users have different logon permissions and VIM configurations. each user has a _ vimrc configuration file, for example: /username/_ vimrc. When we configure _ vimrc for the current user, this setting is only valid for the current user and belongs to a local configuration. However, when we switch to the administrator user, the configuration item is blank and does not have any effect. So it is not the best practice.
Generally, we can configure the global vimrc file, directory address/etc/Vim/vimrc, so that all users share the effect of the current configuration.

1: Download the color file. Molokai ------------ is the current color configuration.

Command: wget http://www.vim.org/scripts/download_script.php? Src_id = 9750-O Molokai. Vim
Download Molokai to the current directory. You can use ls to check whether the file has been downloaded.

2: Put the file in the vim installation directory:
/Usr/share/Vim/vim73/colors/Molokai. Vim (the installed tools are usually in the/usr/share folder)

Run the MV Molokai. Vim/usr/share/Vim/vim73/colors/command to move the file to the colors directory.

(Or directly go to the colors folder in the installation directory of the CD file, and then download the file. This eliminates the need to move the file .)
There are many other color schemes in the colors folder. To enable the Molokai color scheme, add the following command to the vim system configuration file:/etc/Vim/vimrc

3: Enable the color scheme of Molokai

Use Vim to open the vimrc file and add the following command:

Set t_co= 256
Colorscheme Molokai
After configuration, save and exit (: WQ) and reboot the system.

4. configure a single user

Open ~ /. Vim/colors: Create a folder without colors. Put Molokai. Vim in the folder. The path is as follows:
/Home/[user name]/. Vim/colors/Molokai. Vim
Create a new. vimrc and copy the configuration to the file.

Other Vim configurations are configured based on this article: The http://nonocast.cn/gvim-config/ can be selected based on your needs.

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.