1. What is the symbolic representation of the absolute path? What is the current directory and top level directory used for? What does the home directory say? What are the commands for switching directories?
Absolute path such as:/ETC/INIT.D
Current directory:./upper Directory:. /
Home directory: ~/switch directory: CD
2. How do I view the current process? JPs
How do I exit? Exit
View current path: pwd
3. How to clear the screen? Clear
How do I exit the current command? CTRL + C//exit completely
How do I sleep? CTRL +Z suspend current process FG reply backend
What functions does the 4.LS command perform? What parameters can be taken? What's the difference?
LS execution function: Lists directories and files in the specified directory
5. Create a soft connection and a hard-link command
Soft connect: ln-s Hadoop ha
Hard link: ln source target
6. What are the commands for creating a directory?
Create a directory: Mkdir,vi will also create a file, in fact, as long as the output to a nonexistent file, the file will be created
Copy file: CP
7. What are the commands for modifying file permissions? What is the format?
File Permission modification: chmod
The format is as follows:
chmod u+x File//Add Execute permission to the owner of file
chmod 751 File//give the file owner permission to read and write execution (7), add execute permission to other members of the group where Fiel is located, and assign execute permissions to other users
Chmod-r U+r Directory//recursively read permissions to the owner of all files and subdirectories in directory directory
Create File: Touch a.txt
8. What commands can I use to view the contents of a file?
VI file name//edit the way to view files, you can modify
Cat file name//view the full contents of the file
More file name//pagination display asking price content
more//Displays the contents of the entire file from top to bottom page by page so that readers can read the page
Tail file name//Jincha look at the end of the file, you can specify the number of lines
Head File//view header only, specify number of rows
9. Feel free to write a file command? How to output a string with spaces, such as "Hello World" to the screen?
Write File command: VI
Output a string with spaces to the screen: echo Hello World
10 which file in which folder is the terminal?
Terminal file/dev/tty
Black hole file/dev/null
11. Which command is used to move the file? Which command is used for renaming?
Moving files with: MV
Modified file name: MV
12. Which command is used to copy files? What if you have a copy associated with a folder? What if I need to have a hint function?
Copy command: CP
Together with a folder copy: Cp-r//recursive replication
Need prompt function:????
13. Which command is used to delete a file? If you need to delete the directory and the files in the directory? What are the commands for deleting a folder?
Delete: RM
Delete directories and files in directories: rm-r//recursive deletion of files
Delete empty folder: RmDir
What are the possible wildcard characters for the 14.Linux command? What does each mean?
"?" Represents an alternative to a single character
"*" can replace any number of characters
"[CharSet]" can replace any single character in the CharSet collection, such as [A-Z],[ABABC]
15. What command is used to correlate the content of a file? (line number, Word book, number of bytes)
WC command-C Statistics bytes-l count Rows-w count of words
What is the use of the 16.grep command? How do I ignore the case?
17.
What are the different states of a process in Linux? What symbols are represented in the information displayed by PS?
Answer:
(1), non-interruptible state: The process is asleep, but the process is non-disruptive at the moment. Non-interruptible, refers to the process does not respond to asynchronous signals.
(2), pause status/tracking status: Send a SIGSTOP signal to the process, it will enter the task_stopped state due to the signal, and when the process is being traced, it is in the special state of task_traced.
"Being traced" refers to a process that pauses and waits for the process that tracks it to operate on it.
(3), Ready state: status in the Run_queue queue
(4), operating status: In the Run_queue queue status
(5), sleep can be interrupted: a process in this state is suspended because it waits for a certain event to occur (such as waiting for a socket connection, waiting for a semaphore)
(6), Zombie State (zombie): Father did not pass the Wait series system call will also release the body of the child process (task_struct)
(7), exit status
D Non-interruptible uninterruptible (usually IO)
R is running, or the process in the queue
S is in a dormant state
T stop or be traced
Z Zombie Process
W enters memory swap (invalid starting from kernel 2.6)
X dead Process
18. How do I make a command run in the background?
It's usually used & to have the program run automatically at the end of the command line
19. How to display the process with PS? How do I use PS to view information for a specified process?
Ps-ef (System V Output)
Ps-aux BSD Format output
Ps-ef | grep pid//Print out relevant information about PID process
20. Which command is dedicated to viewing background tasks?
Job-l
21. What are the commands when the background task is transferred to the foreground? What is the command to execute a stopped background task?
The background task is transferred to the foreground for execution: FG
command that stops a background task from executing in the background: BG
22. What is the command to terminate the process? With what parameters?
Kill [-s< Information name or number;]
Eg:kill-9 PID
23. How do I view all the signals supported by the system?
Kill-l
24. What are the commands for searching for files? What is the format?
Find < Specify directory > < specify conditions > < specify Actions >
Where plus argument and file name
Locate only add file name
Find direct search disk, slow
Find/-name "string"
25. What are the commands for viewing the current host? What commands do you use to find your terminal information?
Find your terminal information: Who am I
Who is currently using the host: WHO
26. What commands are used to view the list of used commands?
History
27 Use the SET command to view disk usage space? What about free space?
Df-al
28. What commands do you use to check your network connectivity?
Netstat
Netstat-anop | grep pid//Where-a indicates that all port numbers are displayed,-N uses IP address directly instead of the domain name to parse;-p displays the ID and program name of the program in use.
29. What commands do you use to view IP addresses and interface information?
Ifconfig
30. Do you have a command to view various environments?
Env
View one, such as Home:env $HOME
Linux face questions