In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to use the Ubuntu operating system vim, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand it.
1. Switch from Xterm to term (pts-> tty)
Ctr + Alt + F1 ~ F6 can be switched to 6 consoles Ctr + Alt + F7 ~ F12 can be switched back to 6 X terminals
Note: when Ubuntu operating system kernel programming or driver module development, the message will be printed to the tty terminal, can not be seen under the xterm, can only see the log. Therefore, it is recommended to develop the driver directly under the terminal. It is good to use vim.
2. Basic use of vim
There are two modes: command mode (Command Mode) and insert mode (Insert Mode). Just enter the command mode:
I enter insert mode: Q exit vim: W save: wq save and exit: set syn=c setting c style syntax highlight configuration vim configuration file: ~ > sudo vim/ etc/vim/vimrcsyntax on "turn on syntax highlight set tabstop=4 set softtabstop=4 set shiftwidth=4" indent width set autoindent "Auto indent set cindent" c style indent set nu "display line number set vb tweak vb =" close the bell "turn off vim ring
3. Basic writing method of Makefile
4. Drive development
Uname-r prints the current kernel version uname-a prints the system name, kernel version, date. Dmesg prints kernel messages to download linux kernel source code. The source terminal files included in Ubuntu operating system are incomplete.
5. Ubuntu operating system basic decompression command
1. A file with a .an extension: # tar xv file.a 2. File with .z extension: # uncompress file.Z 3. File with .gz extension: # gunzip file.gz 4. File with .bz2 extension: # bunzip2 file.bz2 5. File with .tar.Z extension: # tar xvZf file.tar.Z or # compress-dc file.tar.Z | tar xvf 6. File with .tar.gz / .tgz extension: # tar xvzf file.tar.gz or gzip-dc file.tar.gz | tar xvf-7. File with .tar.bz2 extension: # tar xvjf file.tar.bz2 or bzip2-dc file.tar.bz2 | xvf-8. File with .cpio.gz / .cgz extension: # gzip-dc file.cgz | cpio-div 9. Files with the extension .cpio / cpio: # cpio-div file.cpio or cpio-divc file.cpio 10. File installation with .rpm extension: # rpm-I file.rpm 11. Extract the file with .rpm extension: # rpm2cpio file.rpm | cpio-div network management forum bbs_bitsCN_com 12. File installation with .deb extension: # dpkg-I file.deb 13. Extract the file with .deb extension: # dpkg-deb-- fsys-tarfile file.deb | tar xvf-ar p file.deb data.tar.gz | tar xvzf-14. Files with the .zip extension:
# unzip file.zip
If you unzip a file in Winzip format under linux, you can use the jar command if you have jdk installed; you can also use the unzip command. Directly extract the .tar.gz file xxxx.tar.gz file using tar with the zxvf parameter, can be unzipped at once. XXXX is the file name. For example: $tar zxvf xxxx.tar.gz decompression of various compressed files (installation method)
Ubuntu operating system file extension decompression (installation method)
.an ar xv file.a .Z uncompress file.Z .gz gunzip file.gz .bz2 bunzip2 file.bz2 .tar.Z tar xvZf file.tar.Z compress-dc file.tar.Z | tar xvf-.tar.gz / .tgz tar xvzf file.tar.gz gzip-dc file.tar.gz | tar xvf-.tar.bz2 tar xvjf file.tar.bz2 bzip2-dc file.tar.bz2 | xvf-.cpio.gz / .cgz gzip-dc file .cgz | cpio-div .cpio / cpio cpio-div file.cpio Network Management Forum bbs_bitsCN_com cpio-divc file.cpio .rpm / install rpm-I file.rpm .rpm / extract rpm2cpio file.rpm | cpio-div .deb / install dpkg- I file.deb .deb / exrtact dpkg-deb-- fsys-tarfile file.deb | tar xvf-ar p file.deb data.tar.gz | tar xvzf-.zip unzip file.zip bzip2-d myfile.tar.bz2 | | tar xvf tar xvfz myfile.tar.bz2 x is decompressed v is complex output f is specified file z gz format |
Gzip
Gzip [option] the name of the file to compress (or unzip)
-c writes the output to standard output and keeps the original file.
-d compress the compressed file.
-l for each compressed file, the following fields are displayed: size of the compressed file, size of the uncompressed file, compression ratio, name of the uncompressed file
-r recursively finds the specified directory and compresses or compresses all files in it.
-t Test the compressed file is positive and complete.
-v displays the file name and compression ratio for each compressed and decompressed file.
-num- adjusts the speed of compression with the specified number.
For example:
Make a backup of the / usr directory and all the files including its subdirectories. The backup file is called usr.tar.
Tar cvf usr.tar / home
The Ubuntu operating system backs up and compresses all the files in the / usr directory and its subdirectories. The backup file name is usr.tar.gz.
Tar czvf usr.tar.gz / usr Compresses a set of files with the suffix tar.gz # tar cvf back.tar / back/ # gzip-Q back.tar or # tar cvfz back.tar.gz / back/ to release a file with the suffix tar.gz. # tar zxvf back.tar.gz # gzip back.tar.gz # tar xvf back.tar Thank you for reading this article carefully. I hope the article "how to use the Ubuntu operating system vim" shared by the editor will be helpful to you. At the same time, I hope you will support us and follow the industry information channel. More related knowledge is waiting for you to learn!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
Mysql instance shell: docker run-- name mysql-server-t\-e MYSQL_DATABASE= "zabbix"\-e MYSQL_US
© 2024 shulou.com SLNews company. All rights reserved.