Home >Operation and Maintenance >Linux Operation and Maintenance >Can I use a mouse in linux?
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 mainly used for server-side operation, so its usage is mainly based on the command line, and the mouse is relatively rarely used. In order to make full use of Linux, it is necessary to be familiar with command line operations, because most Linux programs run under the command line.
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 for regular operations, just like Windows; but generally Linux is mainly used to build servers. In order to pursue problems and efficiency, commands are generally used line interface instead of using a 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. When you first learn, you don’t need to pay too much attention to concepts such as emulating the terminal. The first step to using the command line is to open a terminal window where you can enter commands.
Start the terminal
In general systems, you can directly use the mouse to click on the application called terminal. Start the terminal, but as a cool Linux user, how can you 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. If you want to become a proficient Linux user, you should teach yourself to use the keyboard to launch the terminal.
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 change folders, we need to first introduce the organizational structure of the Linux file system. 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, which is recorded as ~. Generally, ~ represents the /home/username folder (root users are a typical abnormal situation). We call the current folder "." (one dot) and the folder one level above it ".." (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. When a path begins with "./", "../", "~/", this is called a relative path because the file it refers to changes relative to the current folder and the current 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 copy command is cp source file path target file path, and the moving command 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 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).
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!