做兼职的网站都有哪些,网站后台流程图,网站建设公司一站通系统简单,网站建设杭州滨江1、什么是Linux#xff1f; 是一种免费使用和自由传播的类UNIX操作系统#xff0c;其内核由林纳斯本纳第克特托瓦兹于1991年10月5日首次发布#xff0c;它主要受到Minix和Unix思想的启发#xff0c;是一个基于POSIX的多用户、多任务、支持多线程和多CPU的操作系统。它能运行…1、什么是Linux 是一种免费使用和自由传播的类UNIX操作系统其内核由林纳斯·本纳第克特·托瓦兹于1991年10月5日首次发布它主要受到Minix和Unix思想的启发是一个基于POSIX的多用户、多任务、支持多线程和多CPU的操作系统。它能运行主要的Unix工具软件、应用程序和网络协议。它支持32位和64位硬件。 2、连接linux比较好用的工具 一直在用FinalShell不仅可以敲命令还有图形化界面可操作 官网下载连接为点击下载 3、登录后你在的位置 一般登陆后你的位置位于自己的主目录中。当不确定自己在哪迷路时可使用 pwd 显示当前目录
[rootecs-yewuyingyong ~]# pwd
/root4、文件的绝对路径和相对路径 绝对文件路径描述了在虚拟机目录结构中该目录的确切位置以虚拟目录根目录开始相当于目录全名。 以正斜杠(/) 开始比如 /usr/local 相对文件路径允许用户执行一个基于当前位置的目标文件路径。 比如当前在 /usr/local 下
[rootecs-yewuyingyong ~]# cd /usr/local
[rootecs-yewuyingyong local]# ls
bin etc games include lib lib64 libexec mysql-8.0.33 mysql-8.0.33-linux-glibc2.12-x86_64.tar.xz nginx redis sbin share src tomcat-gwc tomcat-php var web
[rootecs-yewuyingyong local]# cd bin
[rootecs-yewuyingyong bin]# 5、如何切换目录 语法cd destination destination 相对文件路径或者绝对文件路径 / 称为根目录 . 称为当前目录 … 称为当前目录的上级目录 cd …: 返回上级目录 cd ~进入用户家目 cd -返回最近访问目录 6、如何查看目录中的文件 ls 命令会用最基本的形式显示当前目录下的文件和和目录
[rootecs-yewuyingyong nginx]# ls
auto CHANGES CHANGES.ru conf configure contrib html LICENSE Makefile man objs README src可以用 ls -F来区分哪些是目录(目录带/)哪些是文件(文件不带/)
[rootecs-yewuyingyong nginx]# ls -F
auto/ CHANGES CHANGES.ru conf/ configure* contrib/ html/ LICENSE Makefile man/ objs/ README src/-a 列出目录下的所有文件包括以 . 开头的隐含文件。 -l 列出文件的详细信息。 -r 对目录反向排序。 -t 以时间排序。 -R 列出所有子目录下的文件。(递归) 7、创建文件或目录 (1) 创建文件touch 文件名 批量创建文件touch 文件名 文件名
[rootecs-yewuyingyong temp]# touch a.txt
[rootecs-yewuyingyong temp]# ls
a.txt
[rootecs-yewuyingyong temp]# touch b.txt c.txt
[rootecs-yewuyingyong temp]# ls
a.txt b.txt c.txt(1) 创建目录mkdir 目录名 批量创建目录mkdir 文件名 目录名
[rootecs-yewuyingyong temp]# mkdir me
[rootecs-yewuyingyong temp]# ls
me
[rootecs-yewuyingyong temp]# mkdir you she
[rootecs-yewuyingyong temp]# ls
me she you8、删除文件或目录 语法rm destination 可带以下命令 -f: 不会出现警告信息强制删除 -i: 会出现提示删除信息询问是否删除 -r: 递归删除常用在目录下的删除就是把目录下的东西全删了
[rootecs-yewuyingyong temp]# rm -r me
rm是否进入目录me? y
rm是否删除普通空文件 me/a.txty
rm是否删除目录 meyrm 不能删除有文件的目录需要递归删除。 9、重新命名文件移动文件 语法mv source target (1) 重命名
[rootecs-yewuyingyong temp]# ls
redis
[rootecs-yewuyingyong temp]# mv redis redis3.6
[rootecs-yewuyingyong temp]# ls
redis3.6(2) 移动文件 新建 it 目录把 java 目录移动到 it 目录下
[rootecs-yewuyingyong temp]# ls
java
[rootecs-yewuyingyong temp]# mkdir it
[rootecs-yewuyingyong temp]# mv java it
[rootecs-yewuyingyong temp]# ls -R
.:
it
./it:
java
./it/java:10、复制文件 语法cp source target
[rootecs-yewuyingyong temp]# ls
a.txt it
[rootecs-yewuyingyong temp]# cp a.txt it
[rootecs-yewuyingyong temp]# cd it
[rootecs-yewuyingyong it]# ls
a.txt java当然也可以带上以下命令 -p 带上文件的属性一起赋值 -r 持续递归赋值用于目录的复制行为 -f 强制复制 -i 若目标文档已经存在会询问是否覆盖 注如果重复复制覆盖会默认进行询问如果想强制执行不询问 cp -r 路径 11、压缩文件和解压文件 比如以 .gz 的格式举例。 压缩语法gzip destination 解压语法gunzip destination
[rootecs-yewuyingyong temp]# ls
a.txt it
[rootecs-yewuyingyong temp]# gzip a.txt
[rootecs-yewuyingyong temp]# ls
a.txt.gz it
[rootecs-yewuyingyong temp]# gunzip a.txt.gz
[rootecs-yewuyingyong temp]# ls
a.txt it12、如何查看命令历史记录 history 命令可以展示你用过的命令的历史记录 13、列出已经安装的包、安装软件、更新软件、卸载 列出已经安装的包yum list installed 安装软件yum install package_name 更新软件yum update package_name 卸载软件yum remove package_name //只删除软件包保留数据文件和配置文件 如果不希望保留数据文件和配置文件可以执行yum erase package_name 14、源码安装通常的套路 tar -zxvf xx.gz //解压安装包 cd xx ./configure make make install 15、vim 编辑器的基本操作 语法vim [文件名] 功能 :能打开一个文件,如果不存在就会创建文件. 注意事项 : (1) 第一次进入的时候是普通模式. (2) 想要编辑,要按下 i 进入插入模式 (3) 当把内容写完之后,按 Esc 退出插入模式 (4) 输入英文下的冒号 :然后根据情况输入5至7的字符 (5) q 如果未修改缓冲区数据按 Enter 键退出。 (6) q! 取消所有对缓冲区数据的修改并按 Enter 键退出 (7) wq 将缓冲区数据保存到文件并按 Enter 键退出 16、查看设备还有多少磁盘空间 dm 可以查看所有已挂载在磁盘的使用情况-m 用兆字节
[rootecs-yewuyingyong ~]# df -m
文件系统 1M-块 已用 可用 已用% 挂载点
devtmpfs 15996 0 15996 0% /dev
tmpfs 16006 0 16006 0% /dev/shm
tmpfs 16006 1 16005 1% /run
tmpfs 16006 0 16006 0% /sys/fs/cgroup
/dev/sda1 100664 53539 42912 56% /
tmpfs 3202 0 3202 0% /run/user/017、查看当前系统中的进程 语法ps [参数] 例如查询所在系统 nginx 的进程
[rootecs-yewuyingyong ~]# ps aux|grep nginx
root 3744 0.0 0.0 20712 1520 ? Ss 2023 0:00 nginx: master process /usr/local/web/nginx-iot/sbin/nginx -c /usr/local/web/nginx-iot/conf/nginx.conf
nobody 16489 0.0 0.0 21380 2388 ? S 6月25 2:42 nginx: worker process
root 16857 0.0 0.0 112832 988 pts/1 S 21:25 0:00 grep --colorauto nginx
root 18085 0.0 0.0 20564 660 ? Ss 5月24 0:00 nginx: master process ./nginx
nobody 18086 0.0 0.0 21328 2076 ? S 5月24 14:39 nginx: worker process
root 18260 0.0 0.0 20708 1560 ? Ss 5月24 0:00 nginx: master process ./nginx
root 24103 0.0 0.0 21612 2480 ? S 5月15 1:27 nginx: worker process18、netstat 命令查看当前的网络状态 netstat -anp netstat -anp | grep “进程名” netstat -anp | grep “端口号” 查看端口是否被占用用下面命令
[rootecs-yewuyingyong ~]# netstat ntulp|grep 8080 //查询8080端口是否被占用19、搜索查询匹配的文件 语法 find 「搜索范围就是目录」「选项」 从指定目录向下递归的遍历各个子目录将满足条件的文件或目录显示在终端 -name 按照指定的文件名查找 -user 按照指定的用户进行查找 -size 按照文件大小进行查找 10M 表示超过10M的
[rootecs-yewuyingyong local]# find -name nginx
./nginx
./nginx/objs/nginx
./web/nginx-iot/sbin/nginx
./web/nginx-php/screen2.0/Cesium-1.92/ThirdParty/codemirror-5.52.0/mode/nginx
./web/nginx-php/screen1.7/Cesium-1.92/ThirdParty/codemirror-5.52.0/mode/nginx
./web/nginx-php/screen1.8/Cesium-1.92/ThirdParty/codemirror-5.52.0/mode/nginx
./web/nginx-php/screen2.3/Cesium-1.92/ThirdParty/codemirror-5.52.0/mode/nginx
./web/nginx-php/screen2.1/Cesium-1.92/ThirdParty/codemirror-5.52.0/mode/nginx
./web/nginx-php/screen2.2/Cesium-1.92/ThirdParty/codemirror-5.52.0/mode/nginx
./web/nginx-php/screen2.4/Cesium-1.92/ThirdParty/codemirror-5.52.0/mode/nginx
./web/nginx-php/screen/Cesium-1.92/ThirdParty/codemirror-5.52.0/mode/nginx
./web/nginx-php/screen1.9/Cesium-1.92/ThirdParty/codemirror-5.52.0/mode/nginx
./web/nginx-php/sbin/nginx
./web/nginx-gwc/sbin/nginx20、如何查看当前主机名如何修改
[rootecs-yewuyingyong ~]# hostname //查看当前主机名
ecs-yewuyingyong
[rootecs-yewuyingyong ~]# hostname ecs-guanquyingyong//修改当前主机名
[rootecs-yewuyingyong ~]# hostname //查看当前主机名
ecs-guanquyingyong大家知道一般来讲命令重启就会失效目前基本上用的centos7的比较多两种方式可以支持重启生效。 (1) 命令
[rootecs-yewuyingyong ~]# hostnamectl set-hostname leebao
[rootecs-yewuyingyong ~]# hostname
leebao
[rootleebao ~]#(2) 修改配置文件:/etc/hostname
[rootleebao ~l# vim /etc/hostname以上就是最常用的一些命令另外使用 tab 键可以补全命令