DispersedNet
SiteMap
Network Admin
Unix Admin
System Admin
Network Security
Special File Types
«Prev
Next»
Linux Admin
System Administration
Unix related OS
Determining Unix Version
SU root Privileges
Manual Admin
essential man Options
Adding New Man Pages
man Default Path
Unix OS Conclusion
Access Permissions
File Attributes Permissions
Manipulating Groups Owners
Basic Access Permissions
Numeric Access Codes
Setting Default Permissions
chmod Command
Additional Permission Bits
Unix File Ownership
File Types
Regular Files
Device Files
Symbolic Links
Determining File Types
Directory Listings
ls Command Options
Finding Files Command
Command Predicates
Using xargs with find
wc head tail Commands
Files Directories
Unix Process
Types Processes
Unix Fork Call
Process Access Permission
Suid Guid Permissions
Monitor Running Processes
Search Paths
Simple Shell Script
Periodic Process
crontab Command
Editing Control Crontab
Unix Process Conclusion
Devices Disk Filesystems
Mapping Files Physical Devices
Search Paths | Commands - Exercise
Search Paths and Commands in Unix
Locating commands in Linux and Unix
Objective:
Determine where a command is located and modify the search path to use the command.
Exercise scoring
This exercise is not scored. When you have completed the exercise, click the
Submit
button to continue with the course.
Background
You are the systems administrator for an organization with offices in Bombay, Seattle, and London. Currently, you are in Seattle. You have found that you must reboot one of your UNIX systems. You have learned that the
shutdown -t1 -r
command will reboot the system. This system is relatively new, and no one has used the
shutdown
command on it before.
Instructions
In this exercise, you will see how well you understand determining where a command is located and modifying the search path. Although the simulation uses a Linux machine, the process is almost identical across all versions.
Start the simulation below and work through the situation presented.
1) Linux Command 1
2) Linux Command 2
3) Linux Command 3
4) Linux Command 4
5) Linux Command 5
6) Linux Command 6
7) Linux Command 7
8) Linux Command 8
9) Linux Command 9
You are already logged on as root, so shut down the system by typing |||(S1)shutdown -t 1 -r now shutting down|||(S0).
Shutdown system
shutdown -t 1 -r now shutting down
Note the error message. Now, use the |||(S7)whereis|||(S0) command to determine the location of the shutdown file.
The whereis command
whereis shutdown
Type |||(S1)whereis shutdown|||(S0). This will tell you where the shutdown command is located.
Note that the system returns two entries: The first informs you about the location of the actual shutdown file (/sbin/shutdown). The second informs you about the presence of a man file about shutdown. Now, change to the /sbin directory.
Change directories
cd /sbin
Type cd /sbin. Remember that you must refer to sbin as residing off of root, not off your user1 home directory.