A procedure is presented for each of the following tasks:
The whoami command displays your user ID (login name).
whoami
The system displays your user ID on the next line, and the system prompt returns:
denise $
In addition to your user ID, it is also recommended that you have a password. A password verifies your identity to the system and protects your data from unauthorized access. You can set or change a password using the passwd command. Your password does not appear on the screen when you type it.
At the system prompt, type:
passwd
If you do not have a password, skip step 2.
The following prompt displays:
Changing password for userID userID's Old password:
This request keeps an unauthorized user from changing your password while you are away from your system. Type your current password.
The following prompt displays:
userID's New password:
Type your new password.
The following prompt displays:
Enter the new password again:
This request protects you from setting your password to a mistyped string that you cannot recreate. Type your new password again.
Examples
passwdThe system displays information similar to the following:
Changing password for "denise" denise's Old password: denise's New password: Enter the new password again: $
$ passwd Changing password for "denise" denise's Old password: Your entry does not match the old password. You are not authorized to change "denise's" password. $
$ passwd Changing password for "denise" denise's Old password: denise's New password: Enter the new password again: The password entry does not match, please try again. denise's New password: Enter the new password again: $
You can display the contents of directories to which you have access with the li or ls commands. The li command displays your files and directories in alphabetic order in four columns. The ls command also displays your files and directories in alphabetic order but adjusts the number of columns according to the width of your terminal or window.
A file system is commonly represented as an inverted tree. The root directory, symbolized by a / (slash) symbol, defines a file system and appears at the top of a file-system-tree diagram. Directories branch downward from the root directory in the tree diagram and contain files and subdirectories. Branching creates unique paths through the directory structure to every object in the file system.
Files are typically grouped in a special type of file called a directory. Grouping information improves organization, access time, and flexibility. Directories contain files, subdirectories, or a combination of both.
Each directory, except for root, has one parent directory and can have one or more child directories. In the Example File System illustration directory B is parent to directory C and directory B is child to root.
Since all paths in a file system originate from the root directory, each file in the file system has a unique relationship to the root directory known as the absolute path name. Absolute path names begin with the / (slash) symbol. The absolute path name of file h within the example file system is /B/c/h. Notice that there are two files named g. Because the absolute paths to these files are different, /B/g and /B/c/g, each file named g has a unique name within the system. Every component of a path name is a directory except the final component. The final component of a path name can be a file name.
Another way of writing the path name of a file is the relative path name. The relative path name describes a file relative to your current directory. If your current directory is /B, to get to file h the relative path is C/h. Relative path names do not begin with the / (slash) symbol.
When you log in, the system puts you in a directory called your home directory. Your home directory is where you keep your personal files. The directory you are currently working in is called your current or working directory.
To display the files in your current directory, at the prompt, type:
ls
The system displays information similar to the following:
letter.041393 mail swprint testfile
If the directory listing is very long, the top portion scrolls off the screen. To prevent this from happening, use the ls command piped to the pg command. At the prompt, type:
ls | pg
This command prints the contents of the directory one screen at a time. Each screen is followed by a prompt (:). If you press the Enter key, another page is displayed.
To display the contents of the current directory and distinguishing program files and directories, use the ls command with the -F flag. The -F flag puts a / (slash) after the name if it is a directory and a * (star) after the name if it is a program. At the prompt, type:
ls -F
The system displays information similar to the following:
letter.041393 mail/ swprint* testfile
In the previous example, mail is a directory, swprint is a program, and letter.041393 and testfile are other data or text files.
Hidden files are files with names that begin with a . (dot). These files are normally used for initialization or control files and they are not listed when using the ls command.
At the prompt, type:
ls -a
The system displays information similar to the following:
.profile .xinitrc barchart.ps letter.041393 swprint testfile
In the previous example, the files .profile and .xinitrc are hidden files.
The pg command prints the contents of text files one screen at a time. Each screen is followed by a prompt (:). If you press the Enter key, another page is displayed.
To display the contents of a short file named TimeLog, at the prompt type:
pg TimeLog
The system displays information similar to the following:
Start-up --> Mon Jun 7 08:16:20 CDT 1993 Logout --> Mon Jun 7 18:25:55 CDT 1993 Start-up --> Tue Jun 8 07:05:46 CDT 1993 Logout --> Tue Jun 8 15:57:05 CDT 1993 Start-up --> Wed Jun 9 08:06:15 CDT 1993 Logout --> Wed Jun 9 18:27:16 CDT 1993 $
The pwd (present current directory) command prints your current directory path name.
At the prompt, type:
pwd
The system displays information similar to the following:
/u/denise $
In the previous example, /u/denise is the current directory.
The cd (change directory) command changes your location in the file system from one directory to another. If you have the proper permissions, you can access any directory in the file system. The format of the cd command is:
cd PathName
The following example uses the cd command to change to the directory /usr/bin followed by the pwd command to verify the current directory.
$cd /usr/bin $pwd /usr/bin $
To go to your home directory from any directory, at the prompt type:
cd
The following example uses the cd command alone:
$ pwd /u/denise/work/93 $ cd $ pwd /u/denise $
To go to the parent directory of your current directory, at the prompt type:
cd ..
The following example uses the cd .. command.
$ pwd /u/denise/work/93 $ cd .. $ pwd /u/denise/work $
Running an application in the command line interface is the same as entering a command.
To run an application, at the prompt type the application name:
>ApplicationName
The application program then takes over until you exit the program.
There are various tools available to help you when you need more information on commands and the operating system. These tools are:
To access and view the online Base Documentation Library with a Version 3.2 HTML-compatible web browser, type the following path:
/usr/share/man/info/en_US/a_doc_lib/aixgen/topnav/topnav.htm
To access and view the online Extended Documentation Library, type the following path:
/usr/share/man/info/en_US/a_doc_lib/aixgen/wxinfnav/topnav.htm
The help command presents a one-page display of information for new users.
At the prompt, type:
help
The system displays information similar to the following:
Look in a printed manual for general help if you can. You should have someone show you some things and then read "Using and Managing AIX" manual. The commands: man -k keyword lists commands relevant to a keyword man command prints out the manual pages for a command are helpful; other basic commands are: cat - concatenates files (and just prints them out) ex - text editor ls - lists contents of directory mail - sends and receives mail msgs - system messages and junk mail passwd - changes login password sccshelp - views information on the Source Code Control System smit - system management interface tool tset - sets terminal modes who - who is on the system write - writes to another user You could find programs about mail by the command: man -k mail and print out the man command documentation via: man mail You can log out by typing "exit".
The man command displays information on various reference articles, such as commands, subroutines, and files.
To obtain information about a command, at the prompt type:
man CommandName
The information that the man command provides can also be obtained from the AIX Version 4.3 Commands Reference (Volumes 1-6) in the AIX Version 4.3 Base Documentation CD.
At the prompt, do one of the following:
OR
OR
After you log off, the system displays the login: prompt.
Attention: Do not turn the power off to your system. Turning off the system ends all processes running on the system. If other users are working on the system or if jobs are running in the background, data may be lost. Perform proper shutdown procedures before you stop the system. For more information on shutting down or rebooting your system, see System Startup, Logging In, Shutting Down and Rebooting.