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

Summary of common commands in Ubuntu

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article introduces the relevant knowledge of "Ubuntu common command summary". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

2.5.10 View File contents Command cat

"cat" is a text output command on a linux system that is usually used to view the contents of a file. The format of the "cat" command is as follows:

Cat [options] [File]

The options are described as follows:

-n starts at 1 and numbers the output lines

-b numbering the output lines (except blank lines)

-s merge into a single blank line when two consecutive blank lines are encountered

For example, we use the "cat" command to view the contents of the system file "/ etc/hosts". The result is as follows:

2.5.11 Network configuration Command ifconfig

Ifconfig is a common command to configure and view the status of the network. By changing the command, you can configure the ip address and mac address of the network card, or you can check it.

Take a look at the configuration information of the current network. The command format is as follows:

Ifconfig interface options | address

The parameters are described as follows:

Name of interface Nic, such as eth0, etc.

Up starts the network card

Down shuts down the network card

Add sets the IP address of the network card

View the configuration of the current network card and use the "ifconfig" command, as shown in the following figure:

In the picture above, we can see that the Ubuntu system has two network cards "ens33" and "lo". Ens33 is the actual network card of the Ubuntu system.

Lo is tested and tested in the loop. We can see that the IP address of ens33 is 192.168.0.20, and then we use ifconfig to modify the ens33

The IP is 192.168.0.23, and the running result is shown below:

2.5.12 help Command man

Linux provides a wealth of help manuals, when we need to see how a command is used, we don't have to look it up online, just need

Man this command, it will be fine. Format of the man command:

Man [command name]

For example, if we want to see how the command "mkdir" creates a folder is used, we can type "man mkdir" on the terminal and run the result.

As shown in the following figure:

From the figure above, we can see the specific use of the man command. We can press the "Q" key of the keyboard to exit the man command mode and return to

Go back to the terminal.

2.5.13 system restart command reboot

In the previous chapter of "2.3.3 Ubuntu system shutdown", we talked about the shutdown of ubuntu. We can click the button on the left side of the shutdown interface.

Now that the Ubuntu system is restarted, we can also restart the Ubuntu system at the terminal by entering the command "reboot" and then pressing enter.

The running result is shown in the following figure:

2.5.14 system shutdown command poweroff

In the previous chapter "2.3.3 Ubuntu system shutdown", we talked about the shutdown of ubuntu, and we can also enter the "poweroff" command at the terminal.

Then press the enter key of the keyboard to realize the shutdown of the Ubuntu system. The running result is as follows:

This is the end of the summary of Ubuntu common commands. Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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

Internet Technology

Wechat

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

12
Report