Linux can use the mouse. Under the Linux graphical interface, you can use the mouse for regular operations, just like Windows; but under the Linux command line interface, you do not need the mouse for operations. Linux is designed for servers. It mostly uses commands and only occasionally uses the mouse. Most Linux programs are command line programs, so to fully use Linux, you need to be familiar with command line operations.
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
Linux is a commonly used open source operating system and UNIX-like operating system. It has different operation and design logic from our commonly used Windows and MacOS. Therefore, for many people (especially developers), Linux can be an effective productivity tool.
Can I use a mouse with Linux?
linux has desktop-oriented distributions and server-oriented distributions.
A server-oriented distribution, the users it faces are all computer experts and technical experts. They all operate with keys, and most of them despise mouse operations.
Desktop-oriented distributions, such as Ubuntu, fully support the mouse, and there is no problem of "no mouse control".
In the graphical interface of Linux, you can use the mouse to operate frequently, just like windows; but generally Linux is mainly used to build servers. In order to pursue problems and For efficiency, generally use the command line interface instead of the graphical interface!
The most important thing when using Linux is to break away from mouse operations, so that you can gradually get in touch with the perfect Linux.
Modern Linux has a very complete graphical interface (such as Gnome, KDE, etc.), but most of the programs that require us to use Linux are command line programs. Therefore, to fully use Linux, we need to be familiar with the command line. operate. The first step in using the command line is to open the place where the command line is entered, which is the terminal (there is no need to dwell on the concepts of emulating the terminal when you first learn).
Start the terminal
In general systems, you can directly click the mouse to open the terminal. ) application to start the terminal, but as a cool Linux user, how can I use the mouse to do things that can be done with the keyboard? Most Linux environments will have a shortcut key to start the terminal, and most of them are Ctrl Alt T. As a mature Linux user, you should learn to use the keyboard to start the terminal yourself.
Basic file operations
After starting the terminal, we can use the command line program to our heart's content. Most modern Linux currently uses bash as the default shell (if you don't know what a shell is, forget this sentence). Therefore, we generally only need to learn the basic operations of bash. Generally, when we open the terminal, there will be a symbol such as xxx@xxx: xxx$ at the beginning of each line. This symbol is actually organized in the structure of username@computer name: the folder you are in now$, which can prompt the user for the current location and other information. Let's introduce how to use the command line to perform basic file operations:
View the contents of the current folder
Generally, we only need to use ls (note is l not i, confusing lowercase l and uppercase I is a common mistake everyone makes) can display all ordinary files in the current folder, and use ls -a
to list hidden files. (generally the file name starts with .), some terminals allow you to use la
instead of ls -a
, while in some terminals ls -a
and la
There are subtle differences, some systems do not support the la command.
Switching Folders
When explaining how to switch folders, we must first explain the file organization form of Linux. Linux folders are organized in a tree form. The largest folder is called the root folder, denoted by /, and is the starting point for all files. So we can start from the / folder and find all the folders level by level. In addition, there is a special folder called the user's home folder, recorded as ~. Generally, ~ represents the /home/username folder (root users are a typical abnormal situation). At the same time, we mark the current folder as . (one dot), and the superior folder of the current folder as .. (two dots).
Now that we know how Linux files are organized, the next thing we want to introduce is the concept of paths. The so-called path is to tell the computer the location of the file, so the general path is in the form of /home/user/Documents/article. The path starting with / is called an absolute path. It does not change with the location and user of the folder we are in. Similarly, paths starting with ./, ../, ~/ are called relative paths, because the file they refer to will change depending on the folder and user.
Switching folders is a very simple operation, the command is cd folder path. The path here can be either a relative path or an absolute path. If no path is added after cd, this command is equivalent to cd ~
.
Copy and move files
Copying and moving files is a very simple operation. The command to copy is cp source file path target file path, and the command to move is mv source File path target file path. The only thing worth nagging here is that the file name can be omitted in the target file path, which will default to the original file name as the new file name, or you can enter any content as the new file name (then the rename operation can be achieved through mv, but Please don't use it for huge files (copying a huge file is not fun).
Creating folders and files
Creating folders and files is also a very simple operation. The command to create a folder is mkdir folder name/folder path, and create a file. The command is touch file name/file path (the touch command has more complex usage, which is skipped here). If you use the file (folder) name directly, it will be created in the current folder by default.
Delete files
The command to delete files is rm path. If you want to delete a folder, you should use rm -rf path (do not delete folders you are not familiar with easily. Do not Easily add sudo to this command).
Linux sudo command
Linux system has a more complex permission control system than our commonly used operating systems (very complicated, not discussed here), so we often If you encounter the problem of insufficient permissions, you only need to add sudo in front of the command to obtain higher permissions (in a system with perfect permission control, ordinary users may not be able to use sudo).
Related recommendations: "Linux Video Tutorial"
The above is the detailed content of Can I use a mouse in linux?. For more information, please follow other related articles on the PHP Chinese website!