【Introduce to linux】

Learn Git

    • 1.1 Shell--that is terminal cmd,alse be code language
    • 1.2 File System
    • 1.3 Tools
    • 1.4 Wisdom of Asking

#1 Introduce to Linux

To be Honest,You will develop program under linux when you step into business.

1.1 Shell–that is terminal cmd,alse be code language

Drop mouse:short keys for moving、del and so on when typing on terminal;

  • First to know is Shell;When shell cann’t search keyWords inner,it will turn to environment Variable $PATH.If you want to know where the program is.Just employ which xx;

echo $PATH

which echo

echo "Hello"  -->/usr/bin/echo "Hello"

Be familar with common shell cmd;

Shell Operations:

Operator Description Example

& 允许命令在后台执行 cp -r ./here ./there &

&& 执行多条指令,逻辑和 C++ 类似 wget someurl/install.sh . && ./install.sh

重定向输出 echo “Hello” > hello.txt
< 重定向输入 ./main < in.txt

重定向输出并采取“追加”模式 echo cirno >> visitors.txt

| 连接前后两个程序的输出和输入 ls ~/Documents | grep note.txt

Ask for help:man,help,

1.2 File System

/etc:used for storging

/var:

/tmp:

/mnt:

/srv:

tldr provide you with common cmd with classical usage.for save much time.

1.3 Tools

1.Editor:VIM

vimtutor -g zh is friend for chinese learner.

Emacs/VIM–Notepad+±—Subline TEXT —CRISPR;

2.TMUX–Seaasion

##1.3 Faced with Problem

It must happen that you will be faced with problem when you study or do something.

How to solve problems?1.how to use google. 2. how to look up offical mannual.3.how to choose website.4.how to ask questions effctively.

1.how to use google?

First:Choose right search engine:Bing internation and Google.

Basic:Percise search:

1.filetype:pdf,…

2.site:xxx

3.must include:+,exclude: -

4.any match:*

How to ask help:请至少提供充分的说明:哪段代码?出了什么问题?报错信息是什么?这段代码的目标功能是什么?

Referencea;提问的智慧;

When faced with proplem,you ask help for Bing/Google,Stack Overflow,Stack Exchange.Most important GPT-4;

How to Solve Problem:
1. First turn Online Search: Google best,then Bing Internationale;
* English Priority;
* Use Key words,rather than one statement;
不要用“为什么我的 Mingw C++ 无法编译并且报错 code 987 ,改用"Mingw 无法编译 code 987"
* Summar: site:xxx; + -; *;
* ChatGPT
2. Prefessinal Website:
* StackOverFlow;
* scholar.google.com;For PDF of article;
* https://cs.github.com/ For Code.
* Blibli University,Kehan collage.
3.Official Mannual
* Remember Official Mannual is always the first-hand source.
* View Instance Code for learning;
* Takes some time to Learn from Getting Started,Tutorial,Learn–common words.

1.4 Wisdom of Asking

Reference:online doc can teach you be a good asker.

你可能感兴趣的:(Linux,linux,运维,服务器)