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

An introduction to the Command Line commonly used in linux

2025-02-23 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 "Command Line introduction commonly used in linux". 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!

Ls

Ls-al displays specified directory files

Cd

Cd / home enters the specified directory

Cp cp 1.txt / home copies files to the specified directory

Mv

Mv a b moves or modifies files

Rm

Rm 1.txt rm-f dir delete a file or directory

Pwd

Pwd-p displays the current directory path

Mkdir

Mkdir test creates a new directory

Rmdir

Rmdir test deletes an empty directory

Cat

Cat test.c displays the contents of the file

Echo

Echo "helloworld" echo "hello" > > 1.txt string output

Vi/vim

Vim test.c 's powerful text editor

Touch

Touch 1.txt New File

Ps

Ps aux View process list

Top

Top-D2 dynamically monitors the usage of cpu and memory

Data

Data-u View system time

Chmod

Chmod 777 test.c modify file permissions

Find

Find-name-c looks for files in the specified directory

Grep

Ps aux | grep init text search command (regular expressions are supported)

Passwd

Passwa lisi modifies user password

Useradd

Useradd lisi add Linux user

Tar

Tar-jcvf test.bz2 test / tar-vxftest.bz2 compression and decompression command

Du

Du-h Statistical Catalog occupancy Information

Df

Df-h accumulates system disk usage

Kill all

Kill-9 test kills processes with specified names

Kill

Kill kills the process of the specified pid

Fdisk

Fdisk-l for disk partitions

Tail

Tail-f 1 log is used to view the information at the end of a file. It is often used to view logs.

Free

Free-h to view memory usage

Reboot restart the system

Uname

Uname-a view system version information

Ifconfig views network interface ip information

Ip

Ip route ip addr products look at routing, ip and other information, powerful network tool commands

Route Route View Command

Ping

Ping baidu,.com detects network connectivity at a specified address

Ifup

Ifup-an enables the specified network interface

Ifdown

Ifdown-a disconnects the specified network interface

Scp

Scp book@192.168.1.195:/mcu/main.bin bin/main.bin

Scp is a secure remote file copy command based on ssh login in linux system.

Tee

Echo waht | tee out.txt can be output to the screen and redirected to a file at the same time

Filefile a.out views important information such as the type of files tree can recursively list all the files in the directory and present the cat in a tree

Cat / proc/cpuinfo view cpu information

Cat / etc/os-release View operating system Information

Cat / proc/version view linux version information, including compilation time, etc., as with uname-a command

Cat / proc/kmsg view system kernel log

Cat / proc/arp View system arp Table

Cat / proc/uptime view system startup time

Cat / proc/mouts view mount point

Cat / proc/kallsysms View the list of kernel functions

Cat / proc/vmstat to view detailed memory usage information

Cat / proc/sys/net/netfilter/nf_connntrack_count View the number of system network connections

Awk

Arp-a | grep "192.168.1.20" | awk'{print$4}'

Query the mac address of the specified ip powerful text analysis tool contains some syntax

Sed

Sed'3.4d' test.txt Delete test.txt 3.4 Line online Editing tool

This is the end of the introduction to the Command Line commonly used in linux. 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