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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

寻址00000001

千里之行,始于“足下”

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值