In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "linux daily command summary". In daily operation, I believe many people have doubts about the summary of linux daily commands. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "linux daily command summary". Next, please follow the editor to study!
Linux common commands and turn off the firewall
2. Linux common commands
Mkdir creation
Rm-rf deletion
Chmod-R 777 permissions
Mysql-uroot-r
Quit exit
Find /-name svn search location
3. Turn off the firewall and selinux
Redhat uses SELinux to enhance security by shutting it down by:
1. Permanently valid
Change the SELINUX= "" in the / etc/selinux/config file to disabled, and then restart.
two。 Effective immediately
Setenforce 0
The way to turn off the firewall is:
1. Permanent entry into force
Enable: chkconfig iptables on
Turn off: chkconfig iptables off
two。 Effective immediately and expire after restart
Enable: service iptables start
Turn off: service iptables stop
It should be noted that you can use the above command to enable and close other services under Linux.
Add:
a. The firewall also needs to turn off ipv6's firewall:
Chkconfig ip6tables off
And you can view the status with the following command:
Chkconfig-list iptables
B. selinux status can be viewed with the following command:
Sestatus
=
# uname-a # View kernel / operating system / CPU information
# head-n 1 / etc/issue # View operating system version
# cat / proc/cpuinfo # View CPU information
# hostname # View computer name
# lspci-tv # list all PCI devices
# lsusb-tv # list all USB devices
# lsmod # list the loaded kernel modules
# env # View environment variable resources
# free-m # View memory usage and swap area usage
# df-h # View the usage of each partition
# du-sh # View the size of the specified directory
# grep MemTotal / proc/meminfo # check the total memory
# grep MemFree / proc/meminfo # check the amount of free memory
# uptime # View system running time, number of users, and load
# cat / proc/loadavg # View system load disks and partitions
# mount | column-t # to view the status of attached partitions
# fdisk-l # View all partitions
# swapon-s # View all swap partitions
# hdparm-I / dev/hda # View disk parameters (for IDE devices only)
# dmesg | grep IDE # View the network detection status of IDE devices at startup
# ifconfig # View the properties of all network interfaces
# iptables-L # View firewall settings
# route-n # View the routing table
# netstat-lntp # View all listening ports
# netstat-antp # View all established connections
# netstat-s # process of viewing network statistics
# ps-ef # View all processes
# top # Real-time display of process status users
# w # View active users
# id # View specified user information
# last # View user login log
# cut-d:-F1 / etc/passwd # View all users of the system
# cut-d:-F1 / etc/group # View all groups of the system
# crontab-l # View the scheduled task service of the current user
# chkconfig-list # list all system services
# chkconfig-list | grep on # lists all started system service programs
# rpm-qa # View all installed packages
= =
Linux common commands and turn off the firewall
2. Linux common commands
Mkdir creation
Rm-rf deletion
Chmod-R 777 permissions
Mysql-uroot-r
Quit exit
Find /-name svn search location
3. Turn off the firewall and selinux
Redhat uses SELinux to enhance security by shutting it down by:
1. Permanently valid
Change the SELINUX= "" in the / etc/selinux/config file to disabled, and then restart.
two。 Effective immediately
Setenforce 0
The way to turn off the firewall is:
1. Permanent entry into force
Enable: chkconfig iptables on
Turn off: chkconfig iptables off
two。 Effective immediately and expire after restart
Enable: service iptables start
Turn off: service iptables stop
It should be noted that you can use the above command to enable and close other services under Linux.
Add:
a. The firewall also needs to turn off ipv6's firewall:
Chkconfig ip6tables off
And you can view the status with the following command:
Chkconfig-list iptables
B. selinux status can be viewed with the following command:
Sestatus
=
1.tar command tar-zcvf compressed file name. Tar.gz .gz is the name of the file you want to tar
1.tar czvf hcm20180809.tar hcm
Tar-xvf file.tar / / extract the tar package
Tar-xvf file.tar / / extract the tar package
Tar-xzvf file.tar.gz / / decompress tar.gz
Tar-xjvf file.tar.bz2 / / decompress tar.bz2
Tar-xZvf file.tar.Z / / decompress tar.Z
Unrar e file.rar / / decompress rar
Unzip file.zip / / decompress zip
Jar-xvf tbhcm_mobile-201803090849.war war package decompression
Zip-r filename.zip filesdir packaged zip
two。 Copy
Cp self20180821.tar.. / self change file
3. Remote replication from local to another machine
Upload the local directory to the specified directory on the remote machine
Scp-r / opt/soft/mongodb root@192.168.120.204:/opt/soft/scptest
Modify the file name to the directory
Mv "EmployeeTurnoverPO.class"EmployeeTurnoverPO.class20190514"
Directory authorization to a user chown-R oracle:oinstall bin
Add routes:
Route-n
Route add-net 192.168.40.0 netmask 255.255.255.0 gw 192.168.161.253
=
Set environment variabl
Vi / etc/profile
Export JAVA_HOME=/home/hr/jdk1.6.0_45
Export PATH=$JAVA_HOME/bin:$PATH
Export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
Export JRE_HOME=$JAVA_HOME/jre
Source / etc/profile
The character set is in effect temporarily:
Modify linux utf-8 character set export.UTF-8
At this point, the study of "linux Daily Command Summary" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.