Linux Command line Basics

Source: Internet
Author: User

Command-line Basics some nouns
    • "Graphical Interface"
    • "Command Line"
    • Terminal
    • "shell"
    • "bash"
Installation use
    • Windws: Install git, open Gitbash
    • Linux Open Terminal
    • MAC Open Terminal

Basic command View current full path
pwd
View files in the current directory
# 不包括隐藏文件ls# 查看当前目录下所有文件(包括隐藏文件)ls -a# 查看当前目录下所有文件(包括隐藏文件)的详细信息ls -al
Switch directories
cd /c/projectcd codecd ../csscd ~/Desktop
File Operations Create files
touch readme.md
deleting files
#创建readme.mdrm readme.md #删除node_modules文件夹,不提示rm -rf node_modules
Renaming files
mv readme.md README.md
Create a folder
mkdir projects

File path root directory
cd /
Home Directory
cd ~pwd
Current directory
cd bookscd ./books
Parent Directory
cd ..cd ../css

Editor vim

Edit mode
Command mode

    1. vim a.mdInitial Entry into Editor command mode
    2. iEnter edit mode
    3. A can also be added
    4. The upper left corner of the keyboard esc enters command command mode
    5. :wqSave exit
    6. :q!Do not save forced exits

Installing the server
npm install -g http-serverhttp-server
如果按照这种方式一致报错
解决方案为 加上sudo执行:
即:sudo npm install -g http-server
按回车 输入机器密码即可

Login to the development machine

#passwd: xxxxx

File permissions
chmod 777 index.htmlchown -R git:git even

The most likely issue in command-line operations
  1. Bad case
  2. Blank Space for writing leaks
  3. Take multiple commands as a command

Linux Command line Basics

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.