1. Linux system directory
- / : root directory
- /bin : command to execute files under Linux, which is equivalent to exe execution files under Windows
Extensions:Big Data Framework-software-install/Unpack compressed Packages-bin folder
- /sbin : admin command, root user use
Extensions:Big Data Framework-software-install/Unpack compressed Packages-Sbin folder
- / etc : Store system configuration files such as/etc/hosts
Extensions:Big Data Framework Hadoop-software-install/unpack compressed Packages-etc folder
- /home: By default, the normal user master directory/working directory
when creating a user, the default is in the /home directoryCreate a subfolder with the user name as the working directory for this user
- /opt : Optional meaning, optional, install the software directory
All Big Data software is installed in this directory
- / usr : User Install program (software) directory, default JDK installation directory
2, Basic command operation 2-1, switching between users
$ su-user nameEnter PasswordTo switch users:root switch to normal user1.
Exit 2.
Su-user name
Note There are spaces on both sides!!! 2-2. Basic Operation command
List all files (directories and files) in the directory
Show Current working directory
switch to a directoryNothing is added to the CD.users will automatically jump to the user's home directory/home/xxxroot user will automatically jump to/root
View the contents of the system text file, using page flipping form
find the location of a namesuch as $ which LS
commands that are part of the system administration service that can start services installed on the systemmust use root user action# serivce Iptables stop|status|start|restartFor example:Restart the Nic# Service Network Restart
- Command line to clear the screen
$ clear or Ctrl + L on the keyboard
Special Directories:The first one:
~ represents the current user's home directory/home/user name,Note the root user home directory/rootThe second one:
. Represents the current directoryThe third one:
.. Indicates the parent directory of the target directory
- Change Password: Switch to root user #passwd + username
Enter a new passwordConfirm New Passwordmodified successfully!
text format should be the same as SECURECRT format, otherwise garbledSelect UTF-8
- The difference between ls and ll :
ls is a display-only namell is displayed in the form of a list in detail (with date, etc.)
- man query format: Man + content
Press Q to exit
- Add User:useradd
- Add Link:ln
- Create file:mkdir
Basic commands in Linux