In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail what are the basic commands about linux. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
Some common basic commands:
Uname-a check the kernel version
Ls-al displays the properties of all files
Pwd displays the current path
Cd-return to last directory cd ~ return to home directory
Date s set time and date
Cal display Calendar cal 2006
Bc computing apparatus
Man & info help manual
Locale displays the current font locale-an all available fonts / etc/sysconfig/i18n settings file
LANG=en uses English fonts
Sync writes data synchronously to the hard disk
Shutdonw-h now & half & poweroff shutdown
Reboot restart
Startx & init 5 enters the graphics interface
/ work &? work looks up and down for document content
Chgrp changes the file group chgrp testing install.log
Chown changes the person chown root:root install.log
Chmod changes the property chmod 777 install.log read=4 write=2 execute=1
Cp replication cp filename
Rm Delete Files rm-rf filename Force Delete Files
Rmdir delete folder
Mv Mobile mv 123.txt 222.txt rename
Mkdir create folder
Touch create file update current time
Cat displays cat from the * line | more pagination
Nl adds a line number to the content
More & less flipped side by side
Head-n filename displays the contents of line N
N lines after tail-n filename display
Od displays impure documents
Df-h displays partition spaces
Du displays the size of a directory or file
Fdisk partition settings fdisk-l / dev/hda displays the partition status of the hard disk
Mkfs builds various file systems mkfs-t ext3 / dev/ram15
Fsck checks and repairs LINUX files
Ln hard link ln-s software link
Whereis lookup command
Locate search
Find looks for find /-name "* *. * *"
Which viewing tool
Whoami displays the current user
Gcc-v View GCC version
Chattr + I filename disable deletion chattr-I filename Unban
Lsattr shows hidden file properties
Updatedb updates the database
Mke2fs format mkfs-t ext3
Dd if=/etc/passwd of=/tmp/passwd.bak backup
Mount lists all the partitions of the system
Mount-t iso9660 / dev/cdrom / mnt/cdrom mount CD
Mount-t vfat / dev/fd0 / mnt/floppy mount floppy disk
Mount-t vfat-o iocharset=utf8,umask=000 / dev/hda2 / mnt/hda2 mount fat32 partition
Mount-t ntfs-o nls=utf8,umask=000 / dev/hda3 / mnt/hda3 mount ntfs partition
Linux-NTFS Project: linux-ntfs.sourceforge.net/ "> http://linux-ntfs.sourceforge.net/
Umount / mnt/hda3 load
Ifconfig displays or sets network devices
Service network restart restarts the network card
Ifdown eth0 shuts down the network card
Ifup eth0 opens the network card.
Clear screen cleaning
History History! 55 execute instruction 55
Stty setting terminal stty-a
Fdisk / mbr delete GRUB
At schedules work only once.
Crontab loop routine command [e] edit, [l] display, [r] delete task
& background running program tar-zxvf 123.tar.gz & running in the background
Jobs watches the program jobs-l paused in the background.
Fg sets the background program to the foreground fg n n is a number, which program can be specified
Bg makes the work run in the background
Kill termination process kill-9 PID [9] forced termination, [15] normal termination, [l] lists available kill signals
Ps aux View daemon
Top View daemon top-d 2 updates top-d 2-p10604 every two seconds to watch a PID
Top-b-N2 > / tmp/top.txt carries out the information of top twice, and then outputs the result to / tmp/top.txt
Pstree displays the program [A] in a tree view to connect with ASCII, [u] lists PID, [p] lists account numbers
Killall wants to delete a service killall-9 httpd
Free display memory status free-m is displayed in M
Uptime shows the current system boot time
Netstat displays the network status netstat-tulnp to find out the network connections that are already being monitored on the system and their PID
Dmesg displays boot information demsg | more
Nice sets priority nice-n-5 vi & use root to give a nice value of-5 to execute vi
Priority already exists for renice adjustment
Runlevel displays the current runlevel
Depmod Analysis of the dependence of loadable Modules
Lsmod displays modules loaded into the system
Modinfo displays information about the kernel module
Insmod load module
Modprobe automatic processing loadable module
Rmmod delete module
Chkconfig check, set up various services of the system chkconfig-- list lists the status of each service
Ntsysv sets up various services of the system
Cpio backup files
Compression command:
* .Z compress compressed files
*. Files compressed by bz2bzip2 program
*. Files compressed by gz gzip program
*. The data packaged by the tartar program has not been compressed
*. Files packaged by tar.gz tar programs, which are compressed by gzip
Compress filename compressed file plus [- d] decompress uncompress
Gzip filename compression plus [- d] decompress zcat 123.gz to view the contents of the compressed file
Bzip2-z filename compression plus [- d] decompress bzcat filename.bz2 to view the contents of the compressed file
Tar-cvf / home/123.tar / etc packaged without compression
Tar-xvf 123.tar unpack
Tar-zxvf / home/123.tar.gz decompressed with gzip
Tar-jxvf / home/123.tar.bz2 decompressed with bzip2
Tar-ztvf / tmp/etc.tar.gz View tar content
Cpio-covB > [file | device] share
Cpio-icduv < [file | device] restore
This is the end of this article on "what are the basic commands of linux". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
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
© 2024 shulou.com SLNews company. All rights reserved.