[Sample Solution]
Lab 01 Git URL
Contribution {To be completed by Students}: Student ID Student Name
Self-Evaluation {To be highlighted by Student only}: Need Help Work in Progress Pass Credit
Copyright By PowCoder代写 加微信 powcoder
Tutor Evaluation {To be highlighted by Tutor only}: Incomplete Needs improvement Pass Credit
Contribution
Distinction High Distinction
Distinction High Distinction
Note: Self-Evaluation and Tutor Evaluation to be carried out during an assessed lab week.
1. FindingHelp:
1.a. man
1.b. man ssh
1.c. man
1.d. linuxquestions.org, stackoverflow.com, google.com, reddit.com, unix.stackexchange.com, quora.com (Any three)
2. FileandDirectoryManipulation:
2.b. touch
• Create directory: mkdir
• Delete (empty) directory: rmdir
• Delete (non-empty) directory: rmdir -r
EFolio for FIT3143 | Page 1 of 5
3. UsersandAccessControl:
3.b. chmod 700 $HOME
3.c. The first digit, i.e., 4 from 4775 selects the set user ID (SUID) permission so that the users can execute the file as the file owner. The remaining three digits, i.e., 775 from the 4775 refer to the read, write and execution permissions for the owner, group, and other. In particular, the owner and group are granted for the read, write and execution permission, while the other is granted for the read and execute permissions.
3.d. chmod +x
3.e. ls -l
3.f. ls -ld
4. LinuxShell
4.b. Press up key on the keyboard or use the shortcut CTRL + p
4.c. Press tab key on the keyboard or use the shortcut CTRL + i
• Create User: useradd
• Create Group: groupadd
• Assign the User to the Group: usermod -a -G
Issue the command echo $SHELL in the terminal to show the SHELL environment variable that is set to the machine.
Fig. 1. Screenshot of terminal showing the shell variable
As shown in the figure above, the shell is bash.
• /etc/environment contains the PATH variable.
• It specifies a set of directories where the executable programs are located
• Issue the command cat /etc/environment in the terminal to inspect the value
of the PATH variable
EFolio for FIT3143 | Page 2 of 5
• The shell function alias creates an abbreviation for a command
• Create alias: alias
Fig. 2. Screenshot of creating alias for ls -ld command
4.f. The which command locates the executable file associated with the given command by searching it in the path environment variable. Issue which
4.g. ./
4.i. cat
4.j. find / -name *.html
• A sample shell script is created to display “Hello World!” in the terminal
• Firstly, issue gedit script.sh (or any text editor) to create the shell script
• Write “echo Hello World!” into the script.sh
• Issue chmod +x script.sh in the terminal to make the shell script executable
• Use ./script.sh to run the script
Fig. 3. Screenshot of creating and executing the script.sh
EFolio for FIT3143 | Page 3 of 5
5. Networking
• Issue ifconfig or ip addr to list the network interface that is used to connect to the internet in the machine
• Look for any interface other than the lo (this is the loopback interface), it can be enp0s3, eth0.
Fig. 4. Output of ifconfig command
From the figure above,
• ip address (IPv4): refer to the inet
• hardware address: refer to the ether
• netmask: refer to the netmask
5.b. /etc/hosts file is used to map the hostnames to the IP address in the system, e.g., localhost is mapped to 127.0.0.1
5.c. /etc/resolv.conf is used to specify the name servers for resolver lookups, where it will use the DNS protocol to resolve the hostnames
5.d. netstat -r -n 8.8.8.8
6. Programming Tools (any command that can list the installed packages is applicable, e.g., dpkg, apt)
6.a. apt list –installed | grep gcc
6.b. apt list –installed | grep openmpi
EFolio for FIT3143 | Page 4 of 5
Declaration
I declare that this eFolio tasks and the linked code are my individual work. I have not copied from any other student’s work or from any other source except where due acknowledgment is made explicitly in the text and code, nor has any part of this submission been written for me by another person.
Signature of student 1: __________________ Signature of student 2: __________________
EFolio for FIT3143 | Page 5 of 5
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com