AROS ​​Vision

Modern and free Amiga-Compatible Experience on Amiga and PC

Article 9: The Amiga Shell and AmigaDOS – Working Beyond Workbench 

For many Amiga users, Workbench is the visible face of the operating system. Files can be copied by dragging icons, programs can be started with a double-click, and disks appear as icons on the desktop. But underneath Workbench lies another powerful way of controlling the system: the Amiga Shell. The Shell provides direct access to AmigaDOS, allowing you to execute commands, manipulate files, inspect the system, start programs and automate tasks with scripts. Learning the Shell also helps you understand how AmigaOS works internally. 

1. What Is AmigaDOS? 

AmigaDOS provides many of the operating system's file and command-line services. 

It allows users and programs to work with:
files
directories
volumes
DOS devices
assigns
commands
scripts
input and output

For example, when you enter: Dir SYS: you are asking AmigaDOS to show the contents of the system volume. Similarly:
Copy SYS:S/Startup-Sequence RAM: asks AmigaDOS to copy a file from the system disk to the RAM disk. The Shell is therefore a convenient interactive interface to many AmigaDOS functions. 

2. Opening the Shell 

From Workbench, the Shell can normally be started from the system disk. Depending on your AmigaOS version, it may be found in locations such as:
System or:
System/Shell 

Once opened, a Shell window displays a prompt. A typical prompt might look similar to:
1.System:> You can now enter commands:
Dir or:
Info or:
List 

The Shell executes the command and displays the result. 

3. Shell Commands Are Programs 

One interesting characteristic of AmigaDOS is that many commands are individual executable programs. As we learned in Article 8, many of them reside in:
C: 
For example:
C:Copy
C:List
C:Dir
C:Assign
C:Delete 

When you type: Dir the Shell can locate and execute the appropriate command. This means the Shell itself does not need to contain every command internally. The system can be extended simply by adding additional commands. 4. Getting Help with Commands Before learning individual commands, there is a very useful AmigaDOS convention to know. 

Many commands provide their argument template when you enter: ? after starting the command interactively. 

For example:
Copy ? may show a template describing the arguments accepted by Copy. A template can initially look cryptic:
FROM/M,TO/A,ALL/S,QUIET/S But this is actually a compact description of the command's syntax. 

Common template modifiers include:
/A
/M
/S
/K
/N For example: /A means an argument is required.
/M allows multiple arguments.
/S represents a switch.
/K indicates a keyword argument.
/N indicates a numeric value.

Understanding templates makes learning AmigaDOS commands considerably easier. 

5. The DIR Command 

One of the easiest commands to start with is:
Dir It displays the contents of a directory. For example:
Dir SYS:
shows the contents of the system volume. You can examine C::
Dir C: or your RAM disk:
Dir RAM: You can also specify directories:
Dir SYS:Prefs Dir is useful when you simply want to see which files and directories are available. 

6. DIR vs LIST 

AmigaDOS also provides:
List At first, Dir and List may appear to do almost the same thing. Both can display files. However, List is intended to provide more detailed information. For example:
List SYS:S can provide information about the files in the directory rather than merely presenting a simple directory listing. A useful beginner's distinction is:
Dir
→ quick directory view

List
→ detailed file listing As you become more experienced with AmigaDOS, List becomes an extremely useful command. 

7. Changing the Current Directory 

When working in the Shell, you do not always have to enter complete paths. You can change your current directory. For example:
CD SYS:S Afterwards:
Dir lists the contents of that directory. To see your current location, you can use:
CD The concept is similar to command-line environments on other operating systems. 

8. AmigaDOS Paths 

AmigaDOS paths have a distinctive syntax. For example:
SYS:S/Startup-Sequence
can be divided into:
SYS: and:
S/Startup-Sequence The colon identifies the DOS volume, device or assign. The slash separates directories. Another example is:
Work:Documents/Amiga/Article.txt Here:
Work: is the starting volume or logical name. The remainder identifies directories and finally the file. 

9. Copying Files 

One of the most useful commands is:
Copy A simple example is:
Copy SYS:S/Startup-Sequence RAM: This copies the Startup-Sequence file to the RAM disk. You can check the result:
Dir RAM: You should now see:
Startup-Sequence This demonstrates how naturally different AmigaDOS resources can work together. SYS: may represent your system volume while RAM: represents a memory-based filesystem. To Copy, however, both can be addressed through AmigaDOS paths. 

10. Creating Directories 

The command:
MakeDir creates a new directory. For example:
MakeDir RAM:Test Now:
Dir RAM: should show the new directory. You can then copy something into it:
Copy SYS:S/Startup-Sequence RAM:Test/ 

This gives us a small working example:
RAM:
 |
 +-- Test/
      |
      +-- Startup-Sequence 

The familiar AmigaDOS path would be:
RAM:Test/Startup-Sequence 

11. Renaming Files 

Files can be renamed using:
Rename 

For example:
Rename RAM:Test/Startup-Sequence RAM:Test/MyStartup The file now has a different name. You can check this using:
Dir RAM:Test This ability also applies to moving or renaming objects where supported by the filesystem and command syntax. 

12. Deleting Files 

The AmigaDOS command for removing files is:
Delete 

For example:
Delete RAM:Test/MyStartup Because deletion removes the file, it should naturally be used with care. The same becomes even more important when using patterns or options that can affect multiple files. The RAM disk is therefore a good place to experiment while learning AmigaDOS.

13. TYPE – Displaying Text Files 

To display the contents of a text file, you can use:
Type 

For example:
Type S:Startup-Sequence 

This displays the startup script in the Shell window. This is particularly useful when learning about the operating system because many Amiga configuration and script files are plain text. You can therefore inspect them directly from the Shell. 

14. INFO – Looking at the System's Storage 

Another useful command is:
Info 

It provides information about mounted volumes and DOS devices. This is especially interesting after reading the previous articles because it lets you see some of the AmigaDOS environment directly. The Shell is therefore not merely a tool for manipulating files. It is also a useful window into the structure of AmigaOS. 

15. ASSIGN – The Logical Filesystem 

The Assign command is particularly important. Enter:
Assign and you can inspect the currently defined assigns. 

You may encounter familiar names such as:
C:
DEVS:
FONTS:
LIBS:
S:
T: Now the concepts from Article 8 become visible in practice. For example, a system might logically associate:
LIBS: with: SYS:Libs 

Applications can use LIBS: while the actual directory remains somewhere on the system volume. 16. Creating Your Own Assign You can also create assigns yourself. 

Suppose you have:
Work:Amiga/Documents You could create a logical name such as:
Assign DOCS: Work:Amiga/Documents

 You can then use:
DOCS: instead of writing the full path every time. For example:
Dir DOCS: The structure therefore becomes:
DOCS:
   |
   v
Work:Amiga/Documents 

This is much more than a convenience. It demonstrates how AmigaDOS separates logical names from physical locations. 

17. Wildcards and Patterns 

Working with individual filenames is useful, but command-line environments become much more powerful when you can select multiple files. AmigaDOS supports pattern matching. 

One particularly important pattern is:
#?

 It can be understood, in many everyday situations, as matching arbitrary text. 

For example:
#?.info matches names ending in:
.info 

This becomes useful when working with groups of files. Other AmigaDOS pattern features allow considerably more sophisticated matching. For beginners, remembering: #? is already a valuable starting point. 

18. Redirection 

Normally, command output appears in the Shell window. But AmigaDOS allows output to be redirected. For example, conceptually:
List >RAM:filelist.txt SYS: 

Instead of simply displaying the listing on screen, the output can be written to a file. You can then display it:
Type RAM:filelist.txt Redirection is powerful because command output can become data for another purpose. 

19. NIL: – Throwing Output Away 

AmigaDOS provides another interesting logical destination:
NIL: Anything deliberately directed to NIL: can effectively be discarded. This is useful in scripts when a command produces output that you do not want to display. For example, startup scripts frequently contain constructs involving:
>NIL: When you inspect an Amiga startup script and encounter NIL:, it therefore has a very practical purpose. It prevents unwanted output from cluttering the screen. 20. Execute and Script Files 

The Shell becomes considerably more powerful when several commands are placed in a script. 

Suppose a text file contains:
Echo "Starting my script"
Dir SYS:
Info
Echo "Finished" 

Instead of typing every command manually, AmigaDOS can execute the script using the appropriate script execution mechanism, commonly involving: Execute 

This is exactly why the directory:
S: is important. 

It provides a standard location for scripts. And one particularly important script should now be very familiar:
S:Startup-Sequence The boot process itself therefore demonstrates the scripting capabilities of AmigaDOS. 

21. Environment Variables 

The Shell can also work with environment variables. Commands such as:
Set and related mechanisms allow values to be stored and used by the system. This connects directly to the concepts introduced in Article 8:
ENV: and:
ENVARC: We can think of them as:
ENV:
active environment

ENVARC:
persistent environment The Shell therefore gives you a practical way to interact with concepts that otherwise remain hidden behind Workbench and preference editors. 

22. Why the Shell Is Important 

You can use an Amiga perfectly well without becoming a Shell expert. But learning the Shell changes how you understand the operating system. 

Workbench might show:
Icons
Drawers
Disks
Programs The Shell reveals:
Volumes
Devices
Assigns
Paths
Commands
Files
Scripts
Environment variables 

They are not two completely separate worlds. They are two ways of interacting with much of the same operating-system environment. 

23. Workbench and Shell 

Together Consider a file displayed as an icon on Workbench. Behind the icon is an actual filesystem object. For example, Workbench might visually show a program inside a drawer:
MyProgram From the Shell, you might access that same program through a path:
Work:Programs/MyProgram/MyProgram Workbench gives you a graphical abstraction. The Shell exposes the underlying path-oriented environment. Learning both gives you a much more complete understanding of the Amiga. 

24. A Small Practical Exercise 

A safe way to experiment is to use RAM:. First create a directory:
MakeDir RAM:ShellTest Copy a file into it:
Copy S:Startup-Sequence RAM:ShellTest/ Look at the directory:
Dir RAM:ShellTest Display the copied file:
Type RAM:ShellTest/Startup-Sequence Rename it:
Rename RAM:ShellTest/Startup-Sequence RAM:ShellTest/Startup.txt 
Check the result:
Dir RAM:ShellTest Finally, remove it:
Delete RAM:ShellTest/Startup.txt 

In only a few commands, you have used several important AmigaDOS concepts:
directories
paths
DOS devices
copying
listing
displaying
renaming
deleting 

And because you performed the exercise inside RAM:, the files disappear when the machine is rebooted.  

26. The Bigger Picture 

We can now connect Articles 6 through 9. During boot:

Kickstart
     ↓
AmigaOS components
     ↓
AmigaDOS
     ↓
S:Startup-Sequence
     ↓
System directories and assigns
     ↓
Workbench 

Once the system is running, the Shell allows us to interact with many of these components directly:

                AmigaOS
                  |
          +-------+-------+
          |               |
          v               v
      Workbench          Shell
          |               |
          +-------+-------+
                  |
                  v
               AmigaDOS
                  |
       +----------+----------+
       |          |          |
     Files     Assigns    Devices 

This is why learning the Shell is valuable even if you normally prefer Workbench. It exposes the structure underneath the graphical desktop. Conclusion The Amiga Shell is much more than an alternative way to copy files. 

It provides direct access to many of the fundamental concepts behind AmigaOS: 
AmigaDOS commands
filesystem paths
volumes
DOS devices
assigns
environment variables
scripts
input and output

The most important lesson is that Workbench and the Shell are not isolated environments. They provide different ways of interacting with the same underlying Amiga system. 

Once you are comfortable with commands such as:
Dir
Copy
Assign
Type
Info
Execute 

you can begin to investigate the Amiga rather than merely use it. And this gives us a natural next step: Article 10: AmigaDOS in Depth – Scripts, Redirection, Pipes, Patterns and Command Templates There we can go beyond the basic Shell commands and examine what makes AmigaDOS genuinely powerful: command templates, advanced pattern matching, variables, redirection, pipes, aliases and scripting, including practical examples that can be tested on a real Amiga or in an emulator.