Getting to Know the OS
Welcome to the QNX OS!
Logging In, Logging Out, and Shutting Down
QNX OS is a multiuser operating system; it lets multiple users log in and use the system simultaneously, and it protects them from each other through a system of resource ownership and permissions.
Managing User Accounts
This chapter explains how user accounts work, how users can change their password by using the passwd utility, and how system administrators can use the passwd utility and edit account database files to create and maintain users' accounts.
Using the Command Line
Like QNX 4, Unix, and DOS, the QNX OS is based on a command-line interface that you might want or need to use instead of the GUI.
Processing a command
When you type a command, several different processes interpret it in turn.
Character-device drivers
When you type a command, the first process that interprets it is the character-device driver.
Shell
After the character-device driver processes what you type, the command line is passed to a command interpreter or shell.
Editing the command line
The Korn shell supports emacs-style commands that let you edit the command line.
Command and filename completion
You can reduce the amount of typing you have to do by using command completion and filename completion.
Reserved words
Entering multiple commands
You can enter more than one command at a time by separating your commands with a semicolon (;).
Aliases
You can define an alias in the shell to create new commands or to specify your favorite options.
Substitutions
The shell lets you use a shorthand notation to include the values of certain things in the command line.
Redirecting input and output
You can override the behavior of commands that read from, or write to,
stdin
,stdout
, andstderr
.Pipes
You can use a pipe (|) to build complex commands from smaller ones.
Quoting special characters
Certain characters may have special meaning to the shell, depending on their context. If you want a command line to include any of the special characters that the shell processes, then you may have to quote these characters to force the shell to treat them as simple characters.
History: recalling commands
The shell lets you recall commands that you've previously entered; use the up and down arrow keys to move through the history buffer. You can edit the command, if you wish, and then press Enter to reexecute it.
Shell scripts
You can enter shell commands into a text file, called a shell script, and then invoke the commands in batch mode by executing (or shelling) the file. For more information, see the Writing Shell Scripts chapter in this guide.
Utilities
Once the shell has processed all of its special characters, what remains typically consists of commands and the arguments to them. Most commands correspond to executable files somewhere on your system, although some—such as cd—are built into the shell.
Basic commands
Here we list some QNX OS commands that you'll frequently use.
Troubleshooting
Here are some common problems you might encounter while working on the command line.
Working with Files
In a QNX OS system, almost everything is a file; devices, data, and even services are all typically represented as files. This lets you work with local and remote resources easily from the command line, or through any program that works with files.
Using Editors
An editor is a utility designed to view and modify files.
Configuring Your Environment
The Building Embedded Systems guide describes what happens when you boot your system, and what you can do to customize it. This chapter describes how you can customize the environment that you get when you log in, and then describes some of the setup you might need to do.
Writing Shell Scripts
Shell scripting, at its most basic, is taking a series of commands you might type at a command line and putting them into a file, so you can reproduce them again at a later date, or run them repeatedly without having to type them over again.
Working with Filesystems
The QNX OS provides a variety of filesystems, so that you can easily access DOS, Linux, as well as native Power-Safe disks.
TCP/IP Networking
The term TCP/IP implies two distinct protocols: TCP and IP. Since these protocols have been used so commonly together, TCP/IP has become a standard terminology in today's Internet. Essentially, TCP/IP refers to network communications where the TCP transport is used to deliver data across IP networks.
Backing Up Data
No matter how reliable your hardware and electrical supply are, or how sure you are that you'll never accidentally erase all your work, it's just common sense to keep backups of your files. Backup strategies differ in ease of use, speed, robustness, and cost.
Securing Your System
Now that more and more computers and other devices are hooked up to insecure networks, security has become a very important issue. The word security
can have many meanings, but in a computer context, it generally means preventing unauthorized people from making your computer do things that you don't want it to do.
Fine-Tuning Your System
This chapter describes how you can improve your system's performance.
Understanding System Limits
Resources on a system tend to be finite (alas!), and some are more limited than others. This chapter describes some of the limits on a QNX OS system.
Examples
This appendix includes samples of some of the files described in this guide.
Glossary