您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

linux常用命令最新汇总!

2024/5/4 19:37:04发布72次查看
本文给大家总结介绍linux的常用命令,有需要的朋友可以收藏哦~
linux常用命令
#链接远程服务器ssh root@47.xxx.xxx.46#从服务器上下载文件到本地scp root@47.xxx.xxx.46:/www/wwwroot/xxxx.zip /users/xxxx/work/#上传scp xxx.log root@192.168.0.1:/tmp/ #启动服务php artisan serve --port=80
docker 常用命令
#删除所有的镜像docker rmi -f $(docker images -aq)#删除所有的容器docker rm -f $(docker ps -aq)#拉取镜像docker pull 2233466866/lnmp#启动容器docker run -dit \-p 80:80 \-p 443:443 \-p 3306:3306 \-p 9000:9000 \-v /users/missapp/work/project/docker/www:/www \-v /users/missapp/work/project/docker/mysql:/data/mysql \--privileged=true \--name=lnmp \2233466866/lnmp#查看容器docker images# 进入容器,容器名称与上一步保持一致docker exec -it lnmp /bin/bash
linux 常用命令
#tail 从文件尾部开始读tail -f test.php #从文件头部读head #读取整个文件cat #分页读more #可控分页less #搜索关键字grep grep "111" test.php grep -n "111" test.php grep -n "111" test.php |wc -l ps -ef |grep sshnetstat -anpl |grep 'http'netstat -apn|grep 8077#查找文件find #统计个数wc
lsof -i:80php -i |grep ininetstat -lptnss -ntlp#查看占用端口netstat -tunlp#查看ipifconfigip addr#绝对定位找到你的php.iniphp -i|grep php.inihistory 查看运行的命令记录ping xxx.comtelnet 192.168.0.1 80#重启服务systemctl restart nginxsystemctl restart php-fpm.service#更改目录权限chmod -r 777 ./xxxx#更改所属组chown -r www:www ./xxx
#服务器负载du -sh ./*服务器硬件资源信息内存:free -m 硬盘:df -h负载:w/top
#解压tar -zcvf 压缩文件名 .tar.gz 被压缩文件名tar -zxvf 压缩文件名.tar.gztar -tf xxx.tar 解压文件tar -tvf xxx.tar 解压文件并展示信息zip -r xx.zip ./xxx 压缩 unzip xx.zip 解压
#修改防火墙配置文件 vi /etc/sysconfig/iptables#重启防火墙使配置生效service iptables restart
推荐学习:《linux视频教程》
以上就是linux常用命令最新汇总!的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product