Linux Introduction: Difference between revisions
Ian.percel (talk | contribs) No edit summary |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
This page provides an introduction to the elements of working at the Linux command line and Bash scripting that are most relevant for users of the computing clusters managed by Research Computing Services (RCS) as well as Compute Canada. Working at the command line is an extremely valuable skill for anyone who handles and processes large collections of data. ([https://www.nature.com/articles/d41586-021-00263-0| Nature - Five Reasons Why Researchers Should Learn to Love the Command Line]) The command line is a text-only interface that emphasizes automation of complex tasks through simple scripts or short sequences of commands. Relative to working with a graphical interface, it is somewhat less intuitive and takes some time to learn. However, with a few days of work it is possible to become proficient enough to be comfortable working on HPC systems. | This page provides an introduction to the elements of working at the Linux command line and Bash scripting that are most relevant for users of the computing clusters managed by Research Computing Services (RCS) as well as Compute Canada. Working at the command line is an extremely valuable skill for anyone who handles and processes large collections of data. ([https://www.nature.com/articles/d41586-021-00263-0| Nature - Five Reasons Why Researchers Should Learn to Love the Command Line]) The command line is a text-only interface that emphasizes automation of complex tasks through simple scripts or short sequences of commands. Relative to working with a graphical interface, it is somewhat less intuitive and takes some time to learn. However, with a few days of work it is possible to become proficient enough to be comfortable working on HPC systems. | ||
=Linux Permissions= | |||
A detailed introduction to <code>ls -l</code> output and making sense of Linux permissions can be found in the wiki article: [[Linux Permissions]] | |||
= Useful commands = | = Useful commands = | ||
Line 15: | Line 13: | ||
It can be done by using the | It can be done by using the | ||
$ | $ newgrp groupname | ||
command. It temporarily changes your current default group to <code>groupname</code>. | |||
The command actually starts and new shell. Once the shell is exited the group changes back. | |||
To see all the groups you belong to: | |||
$ groups | |||
command. | or, for a specific user: | ||
$ groups username | |||
= Further Reading = | |||
*[https://linuxcommand.org/tlcl.php|The Linux Command Line by William Shotts] | |||
A free book that provides a fairly illuminating dive into working at the Linux command line and Bash scripting. The main topics required for working on RCS clusters are covered in the first 4 chapters, although the chapters on shell scripting are also very useful. |
Latest revision as of 18:55, 15 October 2021
This page provides an introduction to the elements of working at the Linux command line and Bash scripting that are most relevant for users of the computing clusters managed by Research Computing Services (RCS) as well as Compute Canada. Working at the command line is an extremely valuable skill for anyone who handles and processes large collections of data. (Nature - Five Reasons Why Researchers Should Learn to Love the Command Line) The command line is a text-only interface that emphasizes automation of complex tasks through simple scripts or short sequences of commands. Relative to working with a graphical interface, it is somewhat less intuitive and takes some time to learn. However, with a few days of work it is possible to become proficient enough to be comfortable working on HPC systems.
Linux Permissions
A detailed introduction to ls -l
output and making sense of Linux permissions can be found in the wiki article: Linux Permissions
Useful commands
Change current Unix group
If you are a member of several Unix groups on a system, you default group is normally your personal group with the same name as your user name. As a result, newly created files will normally have this group ownership. Sometimes you may want to force the new files to have a different group ownership. It can be done by using the
$ newgrp groupname
command. It temporarily changes your current default group to groupname
.
The command actually starts and new shell. Once the shell is exited the group changes back.
To see all the groups you belong to:
$ groups
or, for a specific user:
$ groups username
Further Reading
A free book that provides a fairly illuminating dive into working at the Linux command line and Bash scripting. The main topics required for working on RCS clusters are covered in the first 4 chapters, although the chapters on shell scripting are also very useful.