With this prompt, the access rights of the user (u), a group (g) or other users (o) are specified for files and directories. Access is given with a plus sign (+) and taken away with a minus sign (-).
NB: be extra careful when using the chmod prompt, so that you do not make a file accessible to everyone by mistake.
% chmod u+rw my_dear_alisa.txt
% chmod go-rwx my_dear_alisa.txt
Managing Unix processes
The execution of prompts and other programs in Unix is carried out with so-called processes. Processes can be terminated, suspended and they can be set to run in the background (the outputs of the program are not shown on-screen) and back to run in the foreground (so you can see the program being executed on-screen).
One way to use the background run is when you have remote access and you want to use several programs at the same time: you can start any program in the background and continue using other programs over the remote access connection. When you need to, you can return to the background program and use it in the same terminal window or a separate one. This is possible because Unix usually allows you to form several remote connections to the same systems at the same time.
Unix prompts and the execution of Unix programs are usually carried out via the command line. By typing the program execution prompt on the command line, the program will be executed as a foreground run so that you can see the execution on-screen.
You can also execute Unix processes as background runs, i.e. so that the program is not shown on-screen. Use the sign & to set a process to background run. This will allow you to do other things from the command line.
% mozilla &
When a process is running, you can either terminate the whole process completely, or suspend it for a while:
- Terminate a process: CTRL-c
- Suspend a process: CTRL-z.
After giving the terminate prompt, you cannot go back to the process, but if you have suspended a process, you can continue to execute it later.
If you press down the key combination CTRL-z, the program in the foreground will be suspended. A dialogue will appear on-screen (in the example, the pine program has been suspended):
%  + 26457 Suspended (signal) pine
With this prompt, you can find out which programs are running, and which programs are suspended.
% jobs  Suspended (signal) pine
 - Suspended lynx
 + Suspended (signal) tin
This prompt continues to run a suspended process in the background when you give the prompt the id of the process (shown inside [ ] in the example above).
% bg %1  pine &
This prompt brings a suspended process to the foreground (=shown on-screen).
% fg %1
The following list shows some other prompts for managing processes:
- ps -aux = Show process states
- top = Show processes that tax the server processor the most
- kill = Kill the process
Learn more about these prompts with the man prompt.