Summary of linux system instructions
clear 清屏 pwd Print Working Directory的缩写,可显示当前所在工作目录的全路径 whoami 当前用户的用户名 file -name- 显示详细信息
touch 创建文件 cp 复制文件 mv 移动文件,cp和mv在移动复制过程中可以修改文件名,mv可以完成重命名的功能 rm 删除文件,删除后不经过回收站,直接删除,基本无法找回 find 查找文件,-name 以文件名查找 chmod 修改文件权限 r4 w2 x1 例如:chmod 644 文件名 显示:类型 | 所有者 | 同组 | 其他 ln 创建链接文件 硬链接,如果目标文件被删除,不影响链接的访问,它链接的是文件的内容 软链接,如果目标文件删除,则链接文件就不能访问
Linux的目录结构: / 根目录 ~ 当前用户的主目录 .. 当前目录的上一级 . 代表当前目录 mkdir 创建目录 -p 补全所缺失的路径 rmdir 删除空目录 rm -rf 删除非空目录 cp 复制目录 tar 压缩、解压缩目录,压缩 -zcvf、解压 -zxvf chmod -R 以递归的方式 PS:目录就是特殊的文件,操作文件的命令也可以用来操作目录,只是需要加些额外的参数。目录文件只能创建软链接。
ifconfig/ipconfig查看或设置网络配置信息 ping 测试网络是否连通 Linux默认会一直执行,需要用C+c退出。 windows默认只执行4次,/t会一直执行。
telnet:早期使用,明码传输数据。 ssh zhizhen@106.14.147.81采用加密通信,安全,在windows需要安装额外的程序
ftp:简单文件传输协议。 ssh:密文传输保障安全,可以通过命令service sshd status来查看sshd服务是否开启
ubuntu系统的用户分类: 1.超级用户root,在ubuntu中默认不开户 sudo passwd root 重置密码 2.管理员用户 使用sudo命令可能获取到超级权限 3.普通用户 只能在自己的主目录下活动(/home/用户名) 4.访客用户 sudo apt-get update 更新软件源 sudo apt-get upgrade 更新系统 sudo apt-get install pack安装新程序 sudo apt-get install vim sudo apt-get install g++ sudo apt-get install typespeed sudo apt-get remove pack 删除软件 sudo apt-get autoremove pack 自动删除 sudo apt-get install -f 自动补全缺少的依赖文件 sudo reboot 重启 sudo init 0 关机
* 代表任何任意多个字符 ? 代表任意一个字符
> 以清空方式创建一个新文件来存储 >> 以追加方式定入,在原来的基础上添加。
| 把一条命令的执行结束输入给另外一条命令。 find / | grep "name" grep -r "name" * 续行符 \ 当命令一行无法写守时使用
man cmd 1 系统命令 2 系统函数 3 C语言标准库函数 q 键退出
Ctrl+A+t 打开终端 Shift+Ctrl+t 新终端标签(在同一目录下) F11 全屏 up/down 调出命令记录 Ctrl+l 清屏 Tab 补全,如果匹配的内容太多,回车翻一行,空格翻一页。
终端配置文件 ~/.bashrc,每次新添加添加内容要使用source重新加载,如果删除内容,要关闭终端重新启动。 命令提示符:PS1 取别名alias alias name='cmd -arg' 自定义函数 $n 代表第几个参数。
把Linux系统命令,记录在文件中,加入一些流程控制语句,形成的文本文件。 默认是没有执行权限的,需要使用chmod 添加执行权限才能执行。 ./脚本名(脚本名一般以sh结尾)
The above is the detailed content of Summary of linux system instructions. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











The five basic components of the Linux system are: 1. Kernel, 2. System library, 3. System utilities, 4. Graphical user interface, 5. Applications. The kernel manages hardware resources, the system library provides precompiled functions, system utilities are used for system management, the GUI provides visual interaction, and applications use these components to implement functions.

To view the Git repository address, perform the following steps: 1. Open the command line and navigate to the repository directory; 2. Run the "git remote -v" command; 3. View the repository name in the output and its corresponding address.

Although Notepad cannot run Java code directly, it can be achieved by using other tools: using the command line compiler (javac) to generate a bytecode file (filename.class). Use the Java interpreter (java) to interpret bytecode, execute the code, and output the result.

There are six ways to run code in Sublime: through hotkeys, menus, build systems, command lines, set default build systems, and custom build commands, and run individual files/projects by right-clicking on projects/files. The build system availability depends on the installation of Sublime Text.

The main uses of Linux include: 1. Server operating system, 2. Embedded system, 3. Desktop operating system, 4. Development and testing environment. Linux excels in these areas, providing stability, security and efficient development tools.

Installing Git software includes the following steps: Download the installation package and run the installation package to verify the installation configuration Git installation Git Bash (Windows only)

To install Laravel, follow these steps in sequence: Install Composer (for macOS/Linux and Windows) Install Laravel Installer Create a new project Start Service Access Application (URL: http://127.0.0.1:8000) Set up the database connection (if required)

There are many ways to customize a development environment, but the global Git configuration file is one that is most likely to be used for custom settings such as usernames, emails, preferred text editors, and remote branches. Here are the key things you need to know about global Git configuration files.
