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

How to use noilinux

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly introduces the relevant knowledge of how to use noilinux, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this article on how to use noilinux. Let's take a look at it.

Common operations of ▎

1) summoning Terminal: in any case, some basic operations are on the terminal. If the terminal of your linux system is not placed on the desktop, you can Ctrl+Alt+T summon the terminal. In the end, it looks like this:

2) Common commands-ls

Ls means to display files and folders in the current directory. By default, look at the root directory. Linux system is different from windows system. Relatively speaking, linux system does not have the distinction of c disk, d disk, e disk and so on, but the whole is a large folder. The root directory refers to the home folder here, and the files will be stored here by default.

What happens when we type ls on the terminal?

Did you find out? Sure enough, the content displayed is the same as the home folder, in fact, ls is the abbreviation of list! In this way, we can quickly know what files and folders are in the current directory.

Extensions:-an and-l

We will find that when we enter ls, we will see a lot of files and folders, but are these really all files? Of course not! If you type ls-a, you will find everything!

Wow! Unexpectedly, there are so many files are hidden, this command is similar to our windows system to show hidden files, if you look closely, you will find use. The files at the beginning are all previously hidden files. There are generally two kinds of hidden files: either system files (don't change anything) or viruses.

But it is useless to have so many files. I only know the name of the file. what should I do if I want to know the relevant attributes of the file? Enter ls-l to try:

The content of the attribute is divided into 7 items, the first item does not need to know for the time being, the other 6 items are the user (you don't need to know, you can know), the group you belong to (you don't need to know, you can know), the amount of memory occupied, the time of modification: year, month, day, specific time, file name.

But? What is the unit of memory? why is there only a string of numbers? In fact, its units are bytes, and you need to calculate the exact size by yourself, but in order to be more user-friendly, there are other operations, enter ls-lh:

So that the memory can show its reasonable units!

3) Common command-cd

We are seeing all the files and folders in the current directory, but how do we open them? For folders, you can use cd.

Use format: folder name for cd+ operation

For example, I want to open the Desktop folder:

Look! If you look at it again after doing this, you will find that it is already in the Desktop folder. On the contrary, if you open the file with cd, you will get an error:

4) Common commands-mkdir

During the competition, the player's folder may or may not have been built, which requires us to create a directory, and the mkdir command can be used at this time.

Format: mkdir+ directory name

For example, I want to create a new directory called C++:

▎ writes C++ program

Noilinux provides a variety of ways to write C++ programs, such as Anjuta,guide,vim, but the use of vim is advocated here, which is easy to use and debug.

Vim needs to be executed on the terminal, to put it bluntly, it is to write code with the terminal. Input format: name of the new file created by vim+ (remember to write the extension so that it will be highlighted)

Then the interface of vim appears:

But you will find that you can not write code, press the I key at this time, the lower left corner will be changed to insert, so you can write code, give an example of axib problem!

The code is really written, how a little ugly, the feel is not good, the mouse click did not respond. Don't worry, to enhance the feel, you can use the set command.

Press the exit (Esc) key, then type the colon (':'), and then type set nu, and the line number will appear.

Then type the colon (':'), followed by set tabstop=4. And so on, enter the following statement:

All right, the problem is, how to compile and run?

First, to compile, first exit vim, press the exit key (Esc), then type a colon, and then type wq (meaning save and exit, if only save can write w), you will exit vim.

Then type code.cpp + code.cpp-o code,g++ is the compiled language, code.cpp is the source code file (just write the file name of your code here),-o can be understood as renaming (otherwise the default compiled program will be called a.out), and code is the renamed name (here write the name you want to change).

So it's compiled! Then there is running. Type. / code and you can run it!

Enter two numbers, the result is normal, how about, quickly write your first program under the linux system!

This is the end of the article on "how to use noilinux". Thank you for reading! I believe you all have a certain understanding of the knowledge of "how to use noilinux". If you want to learn more, you are 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

Development

Wechat

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

12
Report