Linux basic commands

Source: Internet
Author: User
First, the basic Linux command
1. ls 命令为查看当前目录的信息,常用参数 -l :查看文件详细信息, -a :查看当前目录所有文件,包括隐藏文件 .file。可连打 ls -al2. cd 全程change directory ,接受目录所为参数,只能接受相对目录,或者绝对目录。cd /home/user   cd . 点代表当前目录,cd .. 代表上级目录,cd - 杠代表前一个目录,你从哪儿来就是那儿,cd ~ 小波浪代表宿主目录(操作系统为当前用户设计用来存放文件、工作的默认目录,普通用户为 /home/username/   而root用户为 /root),cd / 斜杠代表的根目录。3. mkdir 用来创建目录,cd /home/user/  切换到user目录下,mkdir lina 创建了一个名为lina的空白文件夹。参数 -p 为递归的创建目录,如  mkdir -p /lina/music4. mv 移动或者重命名文件(move) 使用方式为: mv old_pathname new_pathname  需要改名new_pathname 中直接将文件改名就好5. touch pathname 作用:创建空白文件6. cp 复制(copy)复制文件或者文件夹,使用方式为:cp old_pathname new_pathname   加 r参数复制文件夹,f参数强制复制,覆盖,cp -rf   就是强制复制文件夹了7.rm 删除文件,或文件夹

Linux basic commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.