UNIX/ MINIX Lab #1: Basics of UNIX and UNIX commands
Run
your MINIX virtual machine using VMWARE player. Login into MINIX as root first
and do the following things. Note that
·
You should use man xxx to figure out the
usage of a particular UNIX command xxx if you are not sure about its
usage.
·
You can switch back to your Windows environment
by pressing ctrl+alt.
·
You should include a brief summary of what you encountered in
this lab in this week’s reading report.
- Determine the date, the
current directory you are in at the moment, the default version of shell
used, the contents of the current directory, and the processes that are
running. . (Use commands: date, pwd, echo, l, $SHELL, ps)
- Create at least two
directories. Use cat and redirect to create some txt files in these
directories. Copy files between directories, move files from one directory
to another, and remove some files. (Use commands: mkdir, cat, cp, mv, rm)
- Use gzip, gunzip, tar to
compress, decompress, archive, and extract files.
- Use adduser to create at
least one user account, say guest
in the group other, use su
guest to temporarily become the
new user guest, use passwd
to change the password of the user (remember this password) , and exit to
return to the super user root login
section. Type exit to logout.
- Login in as the new user guest using the password you just
created. Use cd .. to
move upward in the directory hierarchy and use ls -l to see the contents of these
directories. Are you able to cd into the directory /etc? If so, try to use cat
to see the contents of
/etc/passwd and /etc/group. Use ls
-l under
/etc to see who is the owner of these two files. Do you think a general
user like guest should be
allowed to do these things here? Type exit to logout.
- Login again as root and use chmod to change the permissions of the /etc directory and its contents to deny the other users the from accessing the contents of /etc. Type exit to logout.
- Login again as guest. Check whether you can still do things
listed in step 5.