Basic Linux Commands Exercise
BitCuratorEdu
Last Updated: January 18, 2022
About This Exercise
Author
Cal Lee
Description
This hands-on exercise is meant to introduce students to basic Linux commands in the BitCurator environment. These slides are excerpted from Cal Lee’s SAA “Advanced Digital Forensics” class. The sample data referenced in these slides is available here: https://github.com/BitCurator/bcc-dfa-sample-data/
Learning object type
Lesson plan/materials
Learning objectives
This learning object might be used in a lesson to satisfy the following learning objectives:
Command Line Operations
3
as:
command line (no GUI)
Some Considerations
4
Some Important Commands and Tasks
5
General Unix/Linux Tricks
6
commands)
Exercise – Basic Linux Commands
7
pointing to the desktop of the host
Open a command prompt in the BitCurator
environment
8
Exercise – Basic Linux Commands
Exercise – Basic Linux Commands
9
Command | Reason/Explanation |
pwd | Show the directory you’re currently in |
ls | List the contents of the current directory |
cd Desktop | Change the current directory to Desktop |
ls | List the contents of the current directory |
unzip files.zip | Decompress and unpack content of files.zip |
ls | List the contents of the current directory |
cd files | Change the current directory to files |
ls | List the contents of the current directory |
md5sum [file name of first file] > firsthash | Create a hash of a file and output it to a text file |
less firsthash | Display the content of the output to the screen |
Control-z | Stop the “less” program |
md5sum [file name of second file] > secondhash | Create a hash of a second file and output it to a text file |
cat firsthash secondhash > bothhashes | Combine the context of the two output files |
more bothhashes | Display the content of the output to the screen |
most bothhashes | Display the content of the output to the screen (follow instructions for adding it), then run this command again |
sudo apt-get install most
Gives you the right administrative permissions
Uses Advanced Packaging Tool to get the program
Exercise – Basic Linux Commands
10
Command | Reason/Explanation |
rm firsthash | Delete (remove) firsthash file |
rm secondhash | Delete (remove) secondhash |
ls | List the contents of the current directory |
hexdump [file name] -C | less | Show hex dump of a given file [-C switch shows the standard view of hex on left and ASCII on right] |
Use up and down arrows | Navigate within the hex view of the file’s content |
:q | Quit the “less” program |
This resource was released by the BitCuratorEdu project and is licensed under a Creative Commons Attribution 4.0 International License.
Most resources from the BitCuratorEdu project are intentionally left with basic formatting and without project branding. We encourage educators, practitioners, and students to adapt these materials as much as needed and share them widely.
The BitCuratorEdu project is a three-year effort funded by the Institute of Museum and Library Services (IMLS) to study and advance the adoption of digital forensics tools and methods in libraries and archives through professional education efforts. This project is a partnership between Educopia Institute and the School of Information and Library Science at the University of North Carolina at Chapel Hill, along with the Council of State Archivists (CoSA) and several Masters-level programs in library and information science.