...
Table of Contents | ||
---|---|---|
|
...
01 Getting Started
01.01 Getting Started: What is Linux and Linux Distributions (distro)
What is an Operating System?
When you turn your device on, it boots up the operating system, which The main software on a system. It manages the communication/interface between your applications and the hardware it is running on.
As shown in the image above, an operating system (OS) functions between the computer’s hardware and the applications that run on the computer.
What is Linux?
Linux is an Operating Systems – similar to Windows, Mac OS, iOS, Android.
Linux is open-source – freely available – so you can download, modify and redistribute.
Due to this there are 10s of varieties of Linux Distributions (distros):
Debian
Ubuntu (based on Debian)
Fedora
Amazon Linux 2
Commercial: Red Hat (which we are using today)
Rocky Linux
There is a lot of commonality across these distros.
...
Desktop: Windows type Graphical User Interface (GUI) - mouse point and click.
Terminal: Program that opens a graphical window and runs a:
Shell which is a command interpreter that processes the typed commands.
Interface to the OS.
Provides a Command-Line Interface (CLI) – text-based input/output.
Different Shells share common commands, but syntax and behavior can be different.
...
02 Using the Terminal
What does a prompt look like?
General syntax of shell command.
Commands/options are case sensitive.
Getting Help:
Man pages (
man
)Options:
<command> --help
...
Code Block |
---|
[arcc-t05@blog1 ~]$ ls Desktop Documents Downloads [arcc-t05@blog1 ~]$ ls -al total 76 drwxr-x--- 8 arcc-t05 arcc-t05 4096 Oct 3 13:57 . drwxr-xr-x 925 root root 32768 Sep 27 16:21 .. -rw------- 1 arcc-t05 arcc-t05 212 Sep 12 15:44 .bash_history -rw-r--r-- 1 arcc-t05 arcc-t05 18 Aug 10 17:00 .bash_logout -rw-r--r-- 1 arcc-t05 arcc-t05 141 Aug 10 17:00 .bash_profile -rw-r--r-- 1 arcc-t05 arcc-t05 376 Aug 10 17:00 .bashrc drwx------ 3 arcc-t05 arcc-t05 4096 Sep 12 11:36 .config drwxr-xr-x 2 arcc-t05 arcc-t05 4096 Aug 10 17:00 Desktop drwxr-xr-x 2 arcc-t05 arcc-t05 4096 Aug 10 17:00 Documents |
...
02.12 12a Answers
2: How can you find out what the –al
options do?
Use
man ls
orls --help
-a, --all do not ignore entries starting with .
-l use a long listing format
Options are also case sensitive:
Code Block [arcc-t05@blog1 ~]$ ls -A .bash_history .bash_profile .config Documents .emacs .kshrc .mozilla .zshrc .bash_logout .bashrc Desktop Downloads .esd_auth .lesshst .sshWhat does the pwd command do?
...
02.12b Answers
3: What does the pwd
command do?
...
Steps through the previous commands you’ve typed.
...
03 File System
What the file system is, and a typical organization / hierarchy.
Some high-level comparison to that of Windows.
Absolute vs relative paths.
Commands:
pwd
,cd
,ls
,mv
,cp
,mkdir
,rmdir
,rm
History:
history
File Ownership and Permissions.
...
Code Block |
---|
[folder01]$ mkdir folder02 [folder01]$ ls folder02 [folder01]$ cd folder02/ [folder02]$ pwd /home/arcc-t05/folder01/folder02 [folder02]$ cd ../.. [~]$ pwd /home/arcc-t05 |
...
03.16 16a mv: Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY
Code Block |
---|
$ cd
# Create an empty file.
[~]$ touch myfil.txt
[~]$ ls
Desktop Documents Downloads folder01 myfil.txt
# Rename the file ‘myfil.txt’ to ‘myfile.txt’:
[~]$ mv myfil.txt myfile.txt
[~]$ ls
Desktop Documents Downloads folder01 myfile.txt
|
...
03.16b mv: Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY
Code Block |
---|
# Move the file ‘myfile.txt’ into the directory ‘folder01’ [~]$ mv myfile.txt folder01/ [~]$ ls Desktop Documents Downloads folder01 # We can ‘ls’ what is in a relative folder. [~]$ ls folder01/ folder02 myfile.txt |
...
Code Block |
---|
# Can you cd into the /opt folder? [arcc-t05@blog1 ~]$ cd /opt [arcc-t05@blog1 opt]$ # Can you cd into the /root folder? [arcc-t05@blog1 ~]$ cd /root -bash: cd: /root: Permission denied # Justify your answer. [arcc-t05@blog1 ~]$ ls -l / ... # “other” has read permissions drwxr-xr-x. 5 root root 43 Jun 26 11:47 opt ... # No permission set for other read permissions dr-xr-x---. 17 root root 4096 Oct 4 12:58 root |
...
04 Next Steps, Summary
...
04.01 Next Steps, Suggestions
Next Steps on using Linux:
Practicing using Linux online.
Dual boot a Windows machine with Linux.
Run a container image.
UW Researcher? Create a project on the Beartooth cluster with your PI.
...
04.02 Further Trainings: UWYO LinkedIn
...
Introduction to Linux
Learning Linux Command Line
Linux: Files and Permissions
Linux: Over and Installation
Learning Linux Shell Scripting
...
04.03 Request an Account with ARCC
...
...
04.04 Summary
In this workshop we have:
Introduced the basics of the Linux OS using a command-line interface.
Taken a look at the hierarchical file system and how to navigate around it.
Introduced the basics of file/folder permissions and ownership.
How to view, create, update and delete files and folders.
...
04.05 The End
Any questions?
Thank you.