Linux常用命令及基本注释

  • cat /etc/redhat-release // you can know the name of your computer system

  • rpm -ivh filename.rpm //install software pakeage

  • rpm -Uvh filename.rpm //update software

  • rpm -e filename.rpm //uninstall software

  • yum repolist all //cang ku

  • yum list all

  • yum reinstall

  • yum update

  • yum remove //delete pskeaage

  • systemctl start telnet.service // about server

   stop
   restart
    reload
     status
  • systemctl enable telnet.service //kaiji qidong

disable
is-enable

  • systemctl restart network

  • wget -b //houtai downloads

-p //zhiding direction
-p //downlaods all

  • ps -a //print all process
top          //watching system status
pifof       //find process number of service    
kill  +pid   //kill this process
  • uname -a // look system version

  • pwd // print working directory

cd // change directory
ls //list
cat // look
more less head tail //print
find //look for documents

  • tr [source] [destination or target] //replace word of the text or document

for example: cat filename |tr [s] [l]

  • wc -l //print hang nums

-w //print words nums
-c //print bity nums

  • diff --brief // compare two documents

mkdir //mkdir directory
cp -p [source] [target] //copy
rm -rf //delete document
file //look information of file

  • tar --czvf //yasuo

–xzvf //jieyasuo

  • vim /etc/hostname //rename computer

vim /etc/sysconfig/network-scripts/ifcfg-eth 0 //
wangka config
BOOTPROTO=static
NAME=eth0
ONBOOT=yes
IPADDR=
NETMASK=
GATEWAY= DNS1=

  • cd /usr/local/httpd/ //apache config

      主配置文件:/usr/local/httpd/conf/httpd.conf
    
      网页目录:/usr/local/httpd/htdocs/
    
      服务脚本:/usr/local/httpd/bin/apachectl
    
      执行程序:/usr/local/httpd/bin/httpd
    

    访问日志: /usr/local/httpd/log/access_log

    错误日志: /usr/local/httpd/log/error_log // var/www/html websit code document
    // var/ftp/pud ftp document

  • cd /etc/my.cnf //mysql config

  • useradd groupadd passwd

    userdel

  • selinux: setenforce 0 // close selinux is very importance

  • echo -e “GET http://39.105.146.134/ HTTP/1.0 \n\n” | nc 39.105.146.134 80 //wed check

  • pip install requests python

    python -m pip install requests

  • yum -y install mariadb maridb-server

    systemctl start mariadb
    mysql_secure_installation //mariadb
    insert into mysql.user(user,host,password) values(‘ggo’,‘localhost’,password(‘1234’)); flush privileges; // create user

  • cd /etc/yum.repos.d //yum

  • grant all PRIVILEGES on test.* to apple@‘39.105.146.134’ identified by ‘111111’; //yuncheng shouquan

展开阅读全文
©️2020 CSDN 皮肤主题: 深蓝海洋 设计师: CSDN官方博客 返回首页
实付0元
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值