User Tools

Site Tools


vax_vms

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
vax_vms [2026/06/21 03:39] – created - external edit 127.0.0.1vax_vms [2026/08/07 02:12] (current) admin
Line 1: Line 1:
-**# Set Teminal type**+====== VMS Command Reference ======
  
-<code>DEFINE TERM "vt100"</code>+===== Terminal Setup =====
  
 +**# Set Terminal type**
 +<code>DEFINE TERM "vt100"</code>
 <code>SET TERMINAL /DEVICE=VT100 /WIDTH=80</code> <code>SET TERMINAL /DEVICE=VT100 /WIDTH=80</code>
  
 **# Exit almost anything:** **# Exit almost anything:**
- 
 <code>CTRL-Z</code> <code>CTRL-Z</code>
  
-**# Reset pasword:**+**# Change the prompt.** 
 +<code>SET PROMPT="''F$GETSYI("NODENAME")' $ "</code>
  
-<code>SET PASSWORD</code>+**# Put this in to have it executed on every login.** 
 +<code>EDIT SYS$MANAGER:SYLOGIN.COM</code>
  
-Or to change any users password+===== File Management & Navigation =====
  
 +**# Show your current default directory:**
 +<code>SHOW DEFAULT</code>
 +
 +**# Change directory (like cd):**
 +<code>SET DEFAULT [DIRECTORY]</code>
 +<code>SET DEFAULT DKA0:[JOE.SUBDIR]</code>
 +
 +**# Go up one directory level (like cd ..):**
 +<code>SET DEFAULT [-]</code>
 +Go up two levels:
 +<code>SET DEFAULT [--]</code>
 +Go up one level then into a sibling directory:
 +<code>SET DEFAULT [-.SUBDIR]</code>
 +
 +**# List files (like ls):**
 +<code>DIRECTORY</code>
 +Full details (size, date, protection):
 +<code>DIRECTORY /FULL</code>
 +Just filenames, no header/footer (good for scripting):
 +<code>DIRECTORY /BRIEF /NOHEADER /NOTRAILING</code>
 +Recursively list subdirectories:
 +<code>DIRECTORY [...]</code>
 +Wildcards work as expected:
 +<code>DIRECTORY *.COM</code>
 +
 +**# Create a directory (like mkdir):**
 +<code>CREATE /DIRECTORY [.NEWDIR]</code>
 +Create with an owner UIC set:
 +<code>CREATE /DIRECTORY DKA0:[TESTUSER] /OWNER=[200,#]</code>
 +
 +**# Remove a directory (must be empty; delete the .DIR file itself):**
 +<code>SET DEFAULT [-]</code>
 +<code>DELETE NEWDIR.DIR;1</code>
 +
 +**# Copy a file (like cp):**
 +<code>COPY OLDFILE.TXT NEWFILE.TXT</code>
 +Copy into another directory, keeping the name:
 +<code>COPY OLDFILE.TXT [.SUBDIR]</code>
 +Copy an entire directory tree:
 +<code>COPY [SOURCE...]*.* [DEST...] /LOG</code>
 +
 +**# Rename/move a file (like mv):**
 +<code>RENAME OLDNAME.TXT NEWNAME.TXT</code>
 +Move to another directory (rename across dirs works fine in VMS):
 +<code>RENAME FILE.TXT [.SUBDIR]FILE.TXT</code>
 +
 +**# Delete a file (like rm):**
 +<code>DELETE FILE.TXT;1</code>
 +Delete all versions of a file:
 +<code>DELETE FILE.TXT;*</code>
 +Delete with wildcard, prompting for each:
 +<code>DELETE /CONFIRM *.TMP;*</code>
 +
 +**# Purge old file versions (VMS keeps multiple versions by default):**
 +<code>PURGE FILE.TXT</code>
 +Purge everything in current directory, keeping only 2 versions:
 +<code>PURGE /KEEP=2 *.*</code>
 +
 +**# View a file's contents (like cat):**
 +<code>TYPE FILE.TXT</code>
 +Page through a file (like more/less):
 +<code>TYPE /PAGE FILE.TXT</code>
 +
 +**# Search inside files (like grep):**
 +<code>SEARCH FILE.TXT "searchstring"</code>
 +Search across multiple files:
 +<code>SEARCH *.LOG "ERROR"</code>
 +
 +**# Compare two files (like diff):**
 +<code>DIFFERENCES FILE1.TXT FILE2.TXT</code>
 +
 +**# Append to a file:**
 +<code>APPEND NEWSTUFF.TXT EXISTING.TXT</code>
 +
 +**# Show file protections/ownership:**
 +<code>DIRECTORY /SECURITY FILE.TXT</code>
 +
 +**# Change file protection (like chmod):**
 +<code>SET PROTECTION=(OWNER:RWED,GROUP:RE,WORLD:RE) FILE.TXT</code>
 +
 +**# Change file owner (like chown):**
 +<code>SET FILE /OWNER_UIC=[200,15] FILE.TXT</code>
 +
 +**# Find out how much space is used/free on a disk (like df):**
 +<code>SHOW DEVICE DKA0:</code>
 +
 +**# Print a file:**
 +<code>PRINT FILE.TXT</code>
 +
 +===== User & Password Management =====
 +
 +**# Reset your own password:**
 +<code>SET PASSWORD</code>
 +
 +**# Change any user's password:**
 <code>RUN SYS$SYSTEM:AUTHORIZE</code> <code>RUN SYS$SYSTEM:AUTHORIZE</code>
 <code>MODIFY username /PASSWORD=newpassword</code> <code>MODIFY username /PASSWORD=newpassword</code>
 <code>EXIT</code> <code>EXIT</code>
  
-**# Recover System account password:**+**# Add users** 
 +<code>SET DEFAULT SYS$SYSTEM</code> 
 +<code>RUN AUTHORIZE</code> 
 +See what the next available user ID is. 
 +<code>SHOW [200,*] /BRIEF</code> 
 +<code>ADD JOE /PASSWORD=Secret123 /OWNER="Joe User" /DEV=DKA0: /DIR=[JOE] /UIC=[200,#] /FLAG=NODISUSER /PRIV=(TMPMBX,NETMBX) /DEFPRIV=(TMPMBX,NETMBX) /PGFLQUO=100000 /WSEXTENT=16384</code> 
 +Set no password expiry 
 +<code>MODIFY ANONYMOUS /NOPWDEXPIRED /NOPWDLIFETIME</code> 
 +<code>EXIT</code> 
 +Add the user's home directory 
 +<code>CREATE /DIRECTORY DKA0:[TESTUSER] /OWNER=[200,#]</code>
  
 +**# Recover System account password:**
 Type following commands in boot console to perform a conversational boot: \\ Type following commands in boot console to perform a conversational boot: \\
 <code>B /R5:1 DKA300</code> <code>B /R5:1 DKA300</code>
Line 35: Line 144:
 <code>MODIFY SYSTEM /PASSWORD=newpwd</code> <code>MODIFY SYSTEM /PASSWORD=newpwd</code>
  
-**# Add users**+===== Process Management =====
  
-<code>SET DEFAULT SYS$SYSTEM</code> +**# Show all processes on the system (find a PID):** 
-<code>RUN AUTHORIZE</code> +<code>SHOW SYSTEM</code> 
-See what the next available user ID is. \\ +Show just one user's processes: 
-<code>SHOW [200,*] /BRIEF</code> +<code>SHOW SYSTEM /PROCESS=username</code> 
-<code>ADD JOE /PASSWORD=Secret123 /OWNER="Joe User" /DEV=DKA0: /DIR=[JOE] /UIC=[200,#] /FLAG=NODISUSER /PRIV=(TMPMBX,NETMBX) /DEFPRIV=(TMPMBX,NETMBX) /PGFLQUO=100000 /WSEXTENT=16384</code>+Show who's logged in: 
 +<code>SHOW USERS</code>
  
-Set no password expiry +**# Stop/kill a process:** 
-<code>MODIFY ANONYMOUS /NOPWDEXPIRED /NOPWDLIFETIME</code>+<code>STOP /IDENTIFICATION=pid</code>
  
-<code>EXIT</code>+**# Show details on a specific process:** 
 +<code>SHOW PROCESS process-name /CONTINUOUS</code>
  
-Add the user DIR +===== Disk Tasks =====
-<code>CREATE /DIRECTORY DKA0:[TESTUSER] /OWNER=[200,#]</code> +
- +
-**# Change the prompt.** +
- +
-<code>SET PROMPT="''F$GETSYI("NODENAME")' $ "</code> +
- +
-**# Put this in to have it executed on every login.**  +
- +
-<code>EDIT SYS$MANAGER:SYLOGIN.COM</code>  +
- +
-**DISK Tasks**+
  
 **# Initialize (Format) drive:** **# Initialize (Format) drive:**
- 
 <code>INITIALIZE DKA500: SCRATCH /STRUCTURE=5</code> <code>INITIALIZE DKA500: SCRATCH /STRUCTURE=5</code>
  
 **# Mount Drive on startup:** \\ **# Mount Drive on startup:** \\
-**# Add to the end of**  +**# Add to the end of**
 <code>@SYS$MANAGER:SYSTARTUP_VMS.COM</code> <code>@SYS$MANAGER:SYSTARTUP_VMS.COM</code>
- 
 <code>MOUNT/SYSTEM DKA500: SCRATCH</code> <code>MOUNT/SYSTEM DKA500: SCRATCH</code>
  
-**# Enter networking config:** \\+**# Mount a CD/removable media:** 
 +<code>MOUNT /OVERRIDE=IDENTIFICATION DKA100:</code>
  
 +**# Install a program kit:**
 +<code>@SYS$UPDATE:VMSINSTAL FORT066 DKA400:[FORT066.KIT]</code>
 +<code>@SYS$TEST:FORTRAN$IVP</code>
 +
 +**# Backup a directory tree to a save set:**
 +<code>BACKUP [SOURCE...]*.* SAVESET.BCK /LOG</code>
 +Restore from a save set:
 +<code>BACKUP SAVESET.BCK [DESTINATION...] /LOG</code>
 +
 +===== Networking =====
 +
 +**# Enter networking config:** \\
 <code>@SYS$MANAGER:TCPIP$CONFIG</code> <code>@SYS$MANAGER:TCPIP$CONFIG</code>
  
 **# Set default gateway:** \\ **# Set default gateway:** \\
- 
 <code>TCPIP</code> <code>TCPIP</code>
- 
 TCPIP><code>SET ROUTE /DEFAULT /GATEWAY=192.168.1.1</code> TCPIP><code>SET ROUTE /DEFAULT /GATEWAY=192.168.1.1</code>
  
-Start Networking +**# Start Networking**
 <code>@SYS$STARTUP:TCPIP$STARTUP.COM</code> <code>@SYS$STARTUP:TCPIP$STARTUP.COM</code>
  
-**# Find and kill a process:**+**# Show network interfaces / status:** 
 +<code>TCPIP SHOW INTERFACE</code>
  
-<code>WRITE SYS$OUTPUT F$GETDVI("The thing to kill","PID")</code> +**# Ping a host:** 
-<code>STOP /ID=PID_FROM_ABOVE</code> +<code>TCPIP PING hostname</code>
- +
-**# Drive operations**\\ +
-Mount a CD +
-<code>MOUNT/OVERRIDE=IDENTIFICATION DKA100:</code> +
- +
-Install a program kit +
-<code>@SYS$UPDATE:VMSINSTAL FORT066 DKA400:[FORT066.KIT]</code> +
-@SYS$TEST:FORTRAN$IVP+
  
-**# Security**+===== Security =====
  
-Show banned ip's+**# Show banned IPs**
 <code>SHOW INTRUSION</code> <code>SHOW INTRUSION</code>
  
-Clear ban +**# Clear ban** 
-<code>DELETE INTRUSION NTWORK"192.168.1.50"</code> +<code>DELETE INTRUSION NETWORK "192.168.1.50"</code> 
-<code>DELETE INTRUSION TERMINAL"TWA1:"</code>+<code>DELETE INTRUSION TERMINAL "TWA1:"</code>
  
-**# System startup file** +===== System Startup Files =====
- +
-System boot+
  
 +System boot:
 <code>EDIT SYS$MANAGER:SYSTARTUP_VMS.COM</code> <code>EDIT SYS$MANAGER:SYSTARTUP_VMS.COM</code>
- 
 For user login: For user login:
- 
 <code>EDIT SYS$MANAGER:SYLOGIN.COM</code> <code>EDIT SYS$MANAGER:SYLOGIN.COM</code>
  
 +===== Common System Files & Directories =====
  
- +^ Path ^ Purpose ^ 
 +| SYS$SYSTEM | System executables (AUTHORIZE, LOGINOUT, etc.) | 
 +| SYS$MANAGER | System management command files (startup, login) | 
 +| SYS$MANAGER:SYSTARTUP_VMS.COM | Runs at system boot — add custom startup commands here | 
 +| SYS$MANAGER:SYLOGIN.COM | Runs at every user login (site-wide) | 
 +| SYS$LOGIN | Points to the current user's login (home) directory | 
 +| SYS$LOGIN:LOGIN.COM | Per-user login command file | 
 +| SYS$SYSDEVICE | The system (boot) disk device | 
 +| SYS$UPDATE | VMSINSTAL and update/patch kit tools | 
 +| SYS$TEST | Installation Verification Procedures (IVPs) for installed products | 
 +| SYS$HELP | Online help library files | 
 +| SYS$STARTUP | Layered product startup command files (e.g. TCPIP$STARTUP.COM) | 
 +| SYSUAF.DAT | The System User Authorization File — user accounts database (in SYS$SYSTEM) | 
 +| RIGHTSLIST.DAT | Rights identifiers database (in SYS$SYSTEM) | 
 +| VMS$COMMON | Common area on a cluster, shared across all nodes |
vax_vms.1782013150.txt.gz · Last modified: by 127.0.0.1