Windows for UNIX Users
UNIX users moving to Windows 2000/XP are often unaware of just how powerful this
operating system is.
This is a brief and incomplete guide to help them get oriented,
with an emphasis on systems-related topics that ordinary Windows users can often ignore.
A brief UNIX-Windows phrase book
The following is a glossary to tell the experienced UNIX user where to look in Windows
for familiar features. It is not complete.
For help on most Windows commands, simply type the command followed by: /?
UNIX command or feature
|
Windows equivalent
|
cat (to concatenate files)
|
copy (for details type help copy)
|
cat filename
|
copy filename CON:
|
cd, chdir
|
cd (with arguments; . and .. work as in UNIX)
|
chmod
|
attrib (simple operations affecting all users)
cacls (advanced operations involving specific users)
Or just right-click on the file and choose Properties, Security.
|
cp
|
copy (basic functions)
xcopy (advanced functions including directory recursion)
|
cron
|
Control Panel, Scheduled Tasks.
At the command line, use at.
|
.cshrc, .login
|
Login scripts (see Windows help system).
Also, default environment variables, including PATH,
are in Control Panel, System.
|
Ctrl-C (interrupt)
|
Ctrl-C
|
Ctrl-D (end of file)
|
Ctrl-Z
|
/etc/passwd
/etc/shadow
|
Internal object-oriented database; see
Control Panel or Administrative Tools
|
ftp daemon
|
Internet Information Services (IIS)
|
grep
|
find (simple cases);
findstr (multiple alternatives, regular expressions)
(There are also implementations of grep for Windows,
e.g., from Borland.)
|
http daemon
|
Internet Information Services (IIS)
|
ifconfig
|
ipconfig /all (to view settings)
Settings, Network to change settings
|
less filename
|
more filename
|
man
|
help
Also type any command followed by /?
|
more filename
|
more filename
|
mv
|
move to relocate files or directories
rename to rename files or directories
|
passwd
|
To change your own password, press Ctrl-Alt-Del and choose Change Password.
To change users' passwords, use Control Panel, Administrative Tools, or
Control Panel, User Accounts.
|
Perl and Python
|
Available for Windows too, with same functionality
|
ps
|
Press Ctrl-Alt-Del, select Task Manager
|
public_html
|
user's directory under C:\inetpub\wwwroot
|
pwd
|
cd (without arguments)
|
rm -r directory
|
rmdir /s directory
|
shell scripts
|
.BAT and .CMD files; VBSCRIPT programs
|
sort
|
sort
(Pipes and redirection work much the same as in UNIX.)
|
telnet daemon
|
Telnet service (under Control Panel, Services); not enabled by default.
Server versions of Windows also provide a Remote Access Service with GUI.
|
/var/adm/messages
|
Event Viewer (in Control Panel, Administrative Tools)
|
vi
|
notepad (GUI editor, startable from command line);
pay attention to whether you're saving your file as ASCII or Unicode
|
There's a lot more.
For further guidance,
I recommend the Windows books by
Mark Minasi.
Operating system history
UNIX originated at Bell Labs around 1972 and was distributed beginning in 1978.
LINUX is Linus Torvalds' free version of UNIX derived
from the Gnu project.
It is important to distinguish the three different Windows product lines:
- Windows 1.0, 2.0, 3.0, and 3.1, a graphical user interface for DOS that grew
until it almost became a separate operating system.
- Windows NT, 2000, and XP, a multitasking operating system
derived from the Microsoft/IBM OS/2 project (though the code is not derived
from OS/2, despite similarities).
Windows NT was originally architected by Dave Cutler, designer of VAX/VMS.
- Windows 95, 98, and ME, a compromise between the two products, distinctly less reliable
but compatible with DOS device drivers (which the NT line isn't).
In my opinion, only the NT/2000/XP product line is the real thing, and that's what
this document is about.
Windows is bigger, newer, and more elaborate than UNIX.
The days of DOS are long gone, but there are still people who
don't realize Windows is a fully multitasking, virtual-memory
operating system, and some who aren't even aware that it has a command
prompt.
Different architectures
When UNIX was invented, recursion was an exciting new concept, and structured programming was
just getting started. Internally, UNIX relies on arrays and text files as its fundamental
data structures.
Windows is built on considerably newer technology.
Object orientation and default inheritance pervade it.
For example, file and directory permissions are inherited from the parent directory.
Also, under UNIX you can only assign file permissions to everyone, group members, or the file
owner. Under Windows you manipulate Access Control Lists (ACLs) which let you assign permissions
to any user, set of users, computer, or combination thereof.
UNIX system administration requires the sysadmin to memorize, or look up, a large number
of arbitrary codes, file names, and the like.
Windows system administration is largely menu-driven.
UNIX is written in C, a programming language in which arrays are not bounds-checked.
Crackers exploit this fact to insert their own executable code by overrunning input buffers.
Windows was originally written in C and C++ but is moving toward a new software environment,
called the .NET Framework, in which Java-like JIT compilation is combined with automatic
error checking (to prevent overruns and uninitialized variables) and fully object-oriented
systems programming.
Security
It is often claimed that Windows is harder to keep secure than UNIX.
My experience has been the opposite, partly because a Windows system normally offers less for
the outside user to break into. (For instance, Telnet service is
normally turned off, and many of the functions of the machine simply
aren't available from outside.)
To keep Windows secure:
- Don't log in with administrator privileges if you don't have to.
Make yourself a non-administrator account for everyday use. That greatly limits the damage
a virus can do.
- Use NTFS, not FAT or FAT32 (DOS-compatible) filesystems. To convert a disk to NTFS, use
a command such as:
convert c: /fs:ntfs
- Set reasonable permissions on all files and directories. Do not give "write" or "full control"
permission to "Everyone" unless you have a good reason.
- Run antivirus software and keep it up to date.
- Use Microsoft's Windows Update facility (built in) and keep it up to date (or even
use the newer Automatic Updates option).
- If you run IIS (the HTTP and FTP server), run URLSCAN (available free from Microsoft) to
block abnormal or suspicious HTTP requests.
Essential Windows skills
To get to a command prompt, look under Start, Programs, Accessories.
(It is wise to put shortcuts to the Command Prompt in lots of convenient places.)
To adjust the properties of almost any object, right-click on it and choose Properties.
To select any object, left-click on it.
To select multiple objects, select the first one, then
hold down Ctrl while clicking on each of the others.
To select a whole range of objects, select the first,
then hold down Shift while selecting the last.
Many Windows program display tables which you can sort by clicking on
the headings (e.g., Name).
That's how to sort files by name or type, sort e-mail messages by name or date, and so on.
Usual editing shortcuts:
Ctrl-C to copy to clipboard;
Ctrl-X to cut (copy to clipboard and delete);
Ctrl-V to paste from clipboard.