Beginner's Guide to the Linux OS
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.
- Syntax Structure of Command Lines
- Input Mode for SUSE Linux OS
- Switching Users
- Directory Browsing and Control Commands
- Logging in to the SUSE Linux OS Through Remote Login Software
- Logging in to the SUSE Linux OS Using Remote GUI Software
- Using the WinSCP Tool to Send the Software Package to the Server
- Accessing the Linux Terminal UI
- Restarting the SUSE Linux OS
- Shutting down the SUSE Linux OS
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
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.
Switching Users
The Linux OS has strict user management rules. Different OS users can access only associated applications.
- To switch OS users, run the following command:
su OS user name
For example, to switch to the ossuser user, run the following command:
su omm
- To exit an OS user, run the following command:
exit
To switch back to the root user, run the exit command several times until the prompt changes to #.
Directory Browsing and Control Commands
Command/Usage |
Example |
Description |
---|---|---|
cd directory |
cd /opt |
Switches to another directory. |
ls option file directory |
ls -al /opt |
Displays the directory contents or file information. |
mkdir directory |
mkdir install |
Creates a directory. |
pwd |
pwd |
Displays the current directory of the user. |
rm file name |
rm file.tar |
Deletes a file. |
vi file name |
vi file |
Create and modify text a file. |
rmdir directory |
rmdir temp |
Deletes an empty directory. |
fdisk option |
fdisk -l |
Views the quantity of disks. |
man command |
man pwd |
View the online help about a command. |
Logging in to the SUSE Linux OS Through Remote Login Software
There are many remote login software products, such as the PuTTY. This topic takes the PuTTY as an example. The PuTTY is used to log in to the server from a remote site through command lines.
The PuTTY is free software used to log in to the UNIX OS by commands. You can access http://www.putty.org to download the PuTTY.
- Double-click the shortcut icon of the PuTTY software on the desktop. The following dialog box is displayed.
The following table shows the login configurations.
Parameter
Description
Host Name (or IP address)
Specifies the IP address of the server to be logged in to, for example, 192.168.1.100.
Connection type
Specifies the connection type. You need to select a connection type as required. Generally, select
Telnet
or
SSH
NOTE:
If the operating system is not enabled with security hardening, this parameter can be set to either Telnet or SSH. SSH is recommended because it is more secure than Telnet. If the operating system is enabled with security hardening or the Telnet service is disabled, this parameter can be set to SSH only.
Saved Sessions
This parameter cannot be set.
Close window on exit
This parameter cannot be set. The default value is Only on clean exit.
- Set the parameters for logging in to the server. Then, click Open. The login dialog box is displayed.
- Enter the login user name, and then press Enter.
- Enter the login password, and then press Enter.
Logging in to the SUSE Linux OS Using Remote GUI Software
There is various remote GUI software, for example, VNC. For details about how to configure and use the VNC, see Using the VNC to Remotely Log In to the Server GUI
When the remote desktop system is used, choosing Computer > Shutdown or Computer > Logout > Switch User does not take effect. To shut down the system or switch to another user, run associated CLI commands.
Using the SFTP Tool to Upload or Download the Software Package
There are multiple SFTP tools, including WinSCP. For the procedure of uploading the software package to a server using the WinSCP, see Using the WinSCP Tool to Send the Software Package to the Server.
Accessing the Linux Terminal UI
Log in to the SUSE Linux OS using the graphical login software and access the terminal UI. This section uses the VNC as an example. For details, see Opening the Linux Terminal UI
Restarting the SUSE Linux OS
Run the following commands to restart the OS:
# sync;sync;sync;sync
# shutdown -r now
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 by referring to the preceding login method.