I. How to represent a file path
Under Windows, C:\Hjing\test.txt
Under Linux,/hjing/test.txt
Relative path representation method
Cat Test.txt, default is the file under the current directory, if not explained
Cat./test.txt explicitly specifies that the a.txt is in the current directory
Cat.. /hjing/test.txt explicitly specified, test.txt in the previous level directory Hjing sub-directory
Absolute path representation (always starting from the root directory)
/hjing/haha/test.txt
Filenames under windows are case-insensitive, such as: Test.txt = = TEST.txt
Linux file names are case-sensitive, such as: test.txt! = TEST.txt
Ii.. File permissions
For a directory,
If you do not have r permission, LS cannot view content
If you do not have W permissions, you cannot delete, add write operations
If you do not have X permissions, you cannot use the CD entry
RWX rwx rwx
Corresponds to 2 binary 111 111 111
Corresponds to decimal 7 7 7
Third, Linux common editing instructions
VI--is the command mode to enter, press A,i, you can insert the operation, exit first press ESC, and then perform the following actions
: W-Save
: Q, exit
: Wq-Save exit
: q! --Not save exit
CD/, enter the root directory
Terminal VI mode displays line number operations:
1. Return to the home directory, CD enter
2. Generate a. vimrc file, Vi. VIMRC
3. Enter I in the Open command, enter edit mode input set Nu
4. Save exit
The Shell:linux character interface has many different shells, which are the human-computer interaction modes of the character interface.
SH is a very old and basic Unix shell.
If you do not specify a shell when creating a user, the default shell is sh when you log in to this user.
The shell is also a program, typically in the/bin directory
GCC is the Linux system itself, the Linux operating system itself is compiled with GCC
CC is automatic on UNIX systems.
Windows does not bring its own GCC directives.
Install the GCC method under Windows:
1. Download the installation version directly to the GCC website
2. When QT is installed, Qt comes back with a GCC version, found in the QT installation directory Gcc.exe in Windows
Under the installation path, and then put this path into the Windows System environment variable path, in patch last Mina
: Installation path for GCC
Not tested.
In the Linux setup system you can find out how to execute the program in the current directory
1. Go back to the user's home directory, CD enter
2. In the user's home directory, open the file. Profile (Ubuntu),. Bash_profile (Redhat)
3. At the end of the. profile file, add a row of export path= $PATH:. Note that this is case sensitive.
4, Save exit
5,source. Profile (Redhat) source. bahs_profile
All of the above changes are specific to a particular user, such as User a modified, but User B will not take effect, such as root changes, then other users will not take effect
SFTP inside to set the remote path and local path
CD 1 Enter the 1 directory of Linux that is connected remotely
LCD \test
Get abc.c Get file abc.c from remote directory, put in local directory test
How to use http.tar.gz source code files
Step one, upload the file to Linux
Step two, unzip
Gzip-d http.tar.gz
TAR-XVF Http.tar
Step three, go to the HTTP directory
CD HTTP
Fourth step, compile this source code
Make
Fifth step, switch to root user
Su
Sixth step, start the program
./myhttp Start
Listen success
Myhttp begin
The delegate program started successfully.
Day 2nd: File permissions and basic instructions for Linux systems