Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of practical configuration of vim in Ubuntu

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you the example analysis of the practical configuration of vim in Ubuntu, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

1. Package related:

Apt-get update-- runs this command after modifying / etc/apt/sources.list or / etc/apt/preferences. In addition, you need to run this command regularly to ensure that your package list is *.

Apt-get install packagename-- installs a new software package

Apt-get remove packagename-- uninstalls an installed package (retains configuration files)

Apt-get-purge remove packagename-- uninstalls an installed package (removes the configuration file)

Dpkg-force-all-purge packagename can be used because some software is difficult to uninstall and blocks other software applications, but it's a bit risky.

Apt-get autoclean apt will back up the installed or uninstalled software on your hard drive, so if you need space, you can use this command to delete the software you have deleted.

The apt-get clean command will also delete the backup of the installed software, but this will not affect the use of the software.

Apt-get upgrade-- updates all installed software packages

Apt-get dist-upgrade-- upgrades the system to a new version

Apt-cache search string-- searches for strings in the package list

Dpkg-l package-name-pattern-- lists all packages that match the pattern. If you don't know the full name of the package, you can use "* package-name-pattern*".

Aptitude-- takes a closer look at installed or available software packages. Like apt-get, aptitude can be called from the command line, but is limited to certain commands-the most common are install and uninstall commands. Because aptitude knows more than apt-get, it can be said that it is more suitable for installation and uninstallation.

Apt-cache showpkg pkgs-- displays package information.

Apt-cache dumpavail-- prints a list of available packages.

Apt-cache show pkgs-- displays package records, similar to dpkg-print-avail.

Apt-cache pkgnames-- prints the names of all packages in the package list.

Dpkg-S file-- this file belongs to which installed package.

Dpkg-L package-- lists all files in the package.

Apt-file search filename-- looks for packages (not necessarily installed) that contain specific files whose filenames contain the specified string. Apt-file is a separate software package. You must first install it using apt-get install, and then run apt-file update. If apt-file search filename outputs too much, you can try using apt-file search filename | grep-w filename (showing only those file names in which the specified string appears as the full word) or similar methods, for example: apt-file search filename | grep / bin/ (only files located in folders such as / bin or / usr/bin are displayed, if you are looking for a specific execution file It is helpful to do so.

* apt-get autoclean-- runs this command periodically to clear the .deb files of packages that have been uninstalled. In this way, you can free up a lot of disk space. If your needs are urgent, you can use apt-get clean to free up more space. This command deletes the .deb file of the installed software package as well. In most cases, you won't use these .debs files anymore, so if you're worried about running out of disk space, it might be worth a try.

2.Ubuntu vim practical configuration

The configuration file in Ubuntu vim is stored in the / etc/vim directory, the configuration file named Ubuntu vimrc in Fedora vim is stored in the / etc directory, and the configuration file is named Ubuntu vimrc. Enter the following command on the terminal to edit the Ubuntu vimrc configuration file: sudo vim/ etc/vim/vimrc or sudo gedit / etc/vim/vimrc

2.1.Show the line number add a new line at the end of the file and type set nu

2.2.Syntax highlight find "syntax on this line, remove the preceding double quotation marks" in the file, double quotation marks are the meaning of comments

Automatic indentation add a line at the end of the file, enter set autoindent to add a line, enter set cindent where autoindent is automatically indented; cindent is automatic indentation especially for C language syntax

Note: if VIM does not take corresponding actions after setting the above settings, please upgrade your VIM to * * version. Generally, just enter the following command on the terminal: sudo apt-get install vim

3. Empty the contents of a file

> b.lst / * clear the contents of b.lst * /: > b.lst / * clear the contents of b.lst * /

4. Take a screenshot of import-window root hello.jpg with the command

5. Keyboard and other settings modify dpkg-reconfigure console-setup

6.apt-get method to install php5+apache2+mysql5+phpmyadminubuntu install php5+apache2+mysql5+phpmyadmin

Install php,phpmyadmin install with apt-get. The packages that need to be installed are: php5,php5-dev,php-pear,php5-cli,php5-gd;phpmyadmin.

Install apache2 and install it with apt-get. The packages that need to be installed are: apache2,libapache2-mod-security,libapache2-mod-php5 (this module was already installed when php5 was installed)

Install mysql5 install with apt-get. The packages that need to be installed are: mysql-server-5.0,libmysqlclient15-dev,php5-mysql

The above is all the contents of the article "sample Analysis of the practical configuration of vim in Ubuntu". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report