Derivatives: Arabic | Spanish
Updated: 25 March, 2017
 by FreeFind
titel ?

Getting Started
1. Introduction
2. Switching to GNU/Linux
3. Getting openSUSE
4. Installation
The Fundamentals
5. KDE Workspace
6. Apps for Common Tasks
7. Security and Root
8. Terminal
9. Admin. Settings (YaST)
10. Installing Software
11. Software Repositories
12. MS Windows Interop
13. Multimedia Codecs
14. Browser Plugins
15. Graphics Drivers
16. Wifi
A: Help and Docs
B: Games
C. Under the Hood
D. History and Background
E: Getting Involved
GNU Free Documentation License
8. Terminal
Almost anything can be done graphically on a modern GNU/Linux distribution like openSUSE, but to really become a self-reliant user and to truly take advantage of the power of your GNU/Linux operating system, you should at least know a few terminal basics - it's not difficult at all!

There are thousands of commands you can run, each with a number of different options. So this chapter is just a small teaser describing the most common commands.

You'll find Konsole under System in the launch menu.

Using the command line is quite easy. Simply enter a command and possibly one or more options and one or more arguments and then press Enter. Example:
ls -l /home/[username]/

The command ls displays a list of files, the option -l means that the list will be displayed in a long listing format, and the argument /home/[username]/ sets the directory of which the contents are listed.

8.1 Useful Shortcuts

The tab-key is increcibly useful, if possible it will auto-complete commands and arguments, which helps you work faster and avoid typos.

Paste from the clipboard.

This shortcut stops any operation you may have started.

8.2 Examples of Basic Commands
This is just a very small selection of commands to give you an idea of how things work.

tip Commands written in red need to be ran as root.

8.2.1 File Management
Changing directory
cd /home/user/directoryname/

Listing files of a directory

Copying a file
cp filename /home/user/directoryname/filename

Deleting a file
rm filename

Deleting a directory including contents
rm -rf /home/user/directoryname

Moving or renaming a file
mv /home/user/filename /home/user/newfilename

8.2.2 System Monitoring
Running processes and consumpition of system resources. Press 'Q' to exit.

Disk space usage

Memory consumption

8.2.3 Network
Find out your IP-address
ip a

Find out your gateway
ip route

Find out your DNS servers
cat /etc/resolv.conf

8.2.4 Man Pages and Help
Almost all commands have an accompanying manual page describing how to use the command and the available options. For example type:
man cp

To leave the man page again press 'Q'

If a command does not have a man page, try --help instead, example:
cp --help

8.2.5 Becoming Root
To switch to the root user to perform system administration tasks, type:
su -
Then type your (root) password. Nothing will appear on screen as you type, this is intended.

To stop working as root and return to working as your normal user, run exit.

To run a single command as root use:
su -c "[command]"

obs Do not work as root unless it's required.

8.2.6 System Tasks
Shutting down.
systemctl shutdown

systemctl reboot

Start, stop, restart or get status of system services (start|stop|restart|status). Examples:
systemctl restart network
systemctl stop SuSEfirewall2_init
systemctl start apache2
systemctl status smb

Enable or disable a service from starting at every boot. Examples:
systemctl enable sshd
systemctl disable cups

8.2.7 The Kernel
Find out your kernel version and flavour.
uname -r

Check kernel messages (useful for troubleshooting hardware issues).

Listing loaded kernel modules.

Loading a kernel module.
modprobe [modulename]

Unloading a kernel module.
rmmod [modulename]

8.2.8 Hardware Information
The command hwinfo can provide you with information about almost any hardware, some examples:
hwinfo --short --wlan
hwinfo --short --gfxcard

List PCI devices:

List USB devices:

8.3 Editing Text Files
Editing configuration files or other text files can be done like this using the vim editor, which is installed by default.

Open a file with vim /path/to/file. Example:
vim /etc/sysconfig/yast2

obs Root permissions are used in the example because yast2 is a system configuration file - this is not generally required to edit files with vim.

Press i to enter insert mode (you will see "-- INSERT --" at the bottom). Now you can edit the text in the file. When you're done editing press Esc to leave insert mode and return to command mode. Now type :x which is the command for exit and save. To quit without saving any changes use :q!.

Vim is quite advanced, you might consider installing a simpler text based editor, e.g. try nano.

8.4 Further reading
If you want to learn more about using the terminal there are many resources available on the internet, here are a couple of links.

Send your comments via e-mail to admin [at]