No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search


To have a better experience, please upgrade your IE browser.


eSight V300R009C00 Single-Node System Software Installation Guide (SUSE Linux) 09

Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Common SUSE Linux Operations

Common SUSE Linux Operations

This topic describes certain common operations that can be performed on the SUSE Linux workstation. After learning this topic, you can improve the efficiency of the operations on the SUSE Linux OS.

Input Mode for SUSE Linux OS

Click the keyboard icon on the lower-right corner of the desktop and set the input mode to English/Keyboard.

Syntax Structure of Command Lines

The number pad keyboard is not recommended. This is because Num Lock may fail to work normally when the OS is installed on certain machines.

The syntax structure of command lines is as follows:

command option parameter

The SUSE Linux commands are case-sensitive. That is, the OS considers an uppercase letter and its corresponding lowercase letter two different letters. For example, when you want to use the command for displaying the files in the certain directory, the OS can correctly run the ls command, but it cannot run the Ls command because the Ls command is considered as an invalid system command. The options in the SUSE Linux commands are used to change the command execution method. Generally, the options start with the en-dash (-).

For example, run the following command to display the files and the related details in the /opt directory:

ls -al /opt

System Command




Display the current user name.


Display the UID and GID of the current user.

uname -a

Display the system version number.

free -m


grep MemTotal /proc/meminfo

Display the memory information.

fdisk Option

View the quantity of disks.

cat /proc/cpuinfo

Display the CPU information.

ps -ef

Display all processes.

ps -ef | grep java

Display all java processes.

man command

View the online help about a command.


shutdown -r now

Restart the SUSE Linux OS.

When you restart the OS, the remote login user exits. It takes approximately 5 to 8 minutes to restart the OS. After the OS is restarted, re-log in to the server.


shutdown -h now

Shut down the SUSE Linux OS.

Network Command




View the IP address configuration.

netstat -an

View all ports that have been enabled.

netstat -anp | grep Port number


lsof -i :Port number

View status of a single port.


View the route information.

route add -net Destination subnet address netmask Destination subnet mask dev NIC name

For example:

route add -net netmask dev eth0

Add a route.

route del -net Destination subnet address netmask Destination subnet mask

route del -net netmask

Delete a route.

User Command

The Linux OS has strict user management rules. Different OS users can access only associated applications.




Change the login password.

su - OS user name

For example, to switch to the ossuser user, run the following command:

su - ossuser


The differences between su - ossuser and su ossuser are as follows:

  • After the su - ossuser user is switched to the ossuser user, both the operational permissions and environmental variables of the ossuser user are obtained.
  • After the su ossuser user is switched to the ossuser user, only operational permissions and not environmental variables of the ossuser user are obtained.

Switch among OS users.



To switch back to the root user, run the exit command several times until the prompt changes to #.

Exit an OS user.

File Command



mkdir Directory

Create a directory.

rmdir -rf Directory

Delete a directory.

rmdir Directory

Delete an empty directory.

cd Directory

Switch to another directory.

mv Source directory Destination directory path

Move a directory/Change the directory name.

cp -r Source directory Destination directory path

Copy the whole directory.


Display the current directory of the user.

ls Option File directory

Display the directory contents or file information.

cd Absolute path/Relative path

Go to a specified directory.

cd ..

Go to the parent directory.

cd -

Go to the directory that you accessed last time.

vi File name

Create and modify a text file.

rm File name

Delete a file.

cat File name

View the file contents.

mv Source file Destination file path/Destination file name

Move a file/Change the file name.

cp Source file Destination file path

Copy a file.

chown User name:group name File name

chown User name:group name -R Directory name

Change the owner/group of a file/directory.

chown XXX File name

chown -R XXX Directory name


XXX is a three-digit octal numeral.

Change file/directory permission.

find . -name "File name"


The wildcard character (*) is supported in the file name.

Search for a file.

grep "Character string to be searched for" File name

Search for a character string and display the contents of the line where the string exists.

grep -n "Character string to be searched for" File name

Search for a character string and display the No. of line where the string exists.

grep -l "Character string to be searched for" File name

Search for and display the name of the file where the string exists.

Compression and Decompression

Compression Format



Compression: tar cvf Compressed package name.tar Source directory/file

Decompression: tar xvf Compressed package name.tar


Compression: zip -r Compressed package Source directory/file

Decompression: unzip -d Destination directory of the decompressed package Compressed package name.tar


Decompression: tar zxvf Compressed package name.tar.gz


Compression: gzip File name

Decompression: gunzip Compressed package name.gz

Updated: 2019-05-17

Document ID: EDOC1100011860

Views: 92021

Downloads: 136

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Previous Next