Difference between revisions of "Introduction to Linux in HPC/System configuration files"

From HPC Wiki
Introduction to Linux in HPC/System configuration files
Jump to navigation Jump to search
(Created page with "__TOC__ === Video === <!--T:5--> <youtube width="600" height="400" right>IfD9IPixgpo</youtube> [https://git-ce.rwth-aachen.de/hpc.nrw/ap2/tutorials/linux/-/blob/master/Slid...")
 
m (Tweak page sorting and title)
 
(45 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
[[Category:Tutorials|System Configuration Files (Linux)]]<nowiki />
 +
{{DISPLAYTITLE:System Configuration Files (Linux)}}<nowiki />
 +
{{Syllabus Introduction to Linux}}<nowiki />
 
__TOC__
 
__TOC__
 +
 +
This part of the Linux tutorial shows possibilies of system configuration a normal user can do without having root access. Typical aspects in this context like reading system information files, defining aliases, adjusting configuration files and changing locales are taught in this lecture.
  
 
=== Video === <!--T:5-->
 
=== Video === <!--T:5-->
  
<youtube width="600" height="400" right>IfD9IPixgpo</youtube>
+
<youtube width="600" height="340" right>-_rXJlV65Dc</youtube>
 
 
[https://git-ce.rwth-aachen.de/hpc.nrw/ap2/tutorials/linux/-/blob/master/Slides/Linux_Intro/Linux_Intro.pdf Linux Introduction]  Slides 119 - 128 (10 pages)
 
 
 
 
 
=== Slide Layout === <!--T:5-->
 
 
 
 
 
 
 
    page 1:
 
        Special files in /proc, e.g. /proc/cpuinfo and /proc/meminfo
 
        display with cat
 
        cannot be edited
 
    page 2:
 
        environment variable PATH
 
        Directories are separated by :
 
        First command found will be used.
 
        PYTHONPATH
 
    page 3:
 
        environment modules for cluster
 
        It becomes easier to switch environment.
 
    page 4:
 
        environment modules: definition file for each module
 
        Example: load OpenMPI module
 
    page 5:
 
        Three things for environment modules:
 
            description
 
            prepend to path and other variables
 
            set new variables
 
    page 6:
 
        Alias for long command.
 
        How to define alias.
 
        Examples: alias ll='ls -l'
 
    page 7:
 
        Environment variables and aliases settings in console are temporary.
 
        To make them permanent: write settings into configuration file.
 
    page 8:
 
        Other configuration files, e.g. ~/.vimrc
 
        Breaking .bashrc can make it impossible to login.
 
        source <filename> to apply changes.
 
    page 9:
 
        What is locale?
 
        the locale command
 
    page 10:
 
        Example output of locale
 
 
 
  
 +
([[Media:HPC.NRW_Introduction_to_Linux_in_HPC_11_System_Configuration.pdf | Slides as pdf]])
  
 
=== Quiz === <!--T:5-->   
 
=== Quiz === <!--T:5-->   
 
  
 
{{hidden begin  
 
{{hidden begin  
|title = In which system file could you find the CPU information of a Linux computer?
+
|title = 1. In which system file could you find the CPU information of a Linux computer?
 
}}
 
}}
 
<quiz display=simple>
 
<quiz display=simple>
Line 70: Line 30:
  
  
{{Warning|mode=info|text= '''no tips in this section'''}}
+
{{hidden begin
 +
|title = 2. How is it possible to define aliases?
 +
}}
 +
<quiz display=simple>
 +
{
 +
|type="()"}
 +
+  <code>alias name='command'</code>
 +
|| Explanation: An alias has always to be defined the following way: <code>alias name='command'</code>.
 +
||Typical aliases are: <code>alias ll='ls -l'</code> and <code>alias cd..='cd ..'</code>
 +
-  <code>alias 'command'=name</code>
 +
||
 +
-  <code>'command'=alias name</code>
 +
</quiz>
 +
{{hidden end}}
 +
 
 +
 
 +
{{hidden begin
 +
|title = 3. Console settings are...
 +
}}
 +
<quiz display=simple>
 +
{
 +
|type="()"}
 +
+  usually temporary but could be changed to permanent
 +
|| Explanation: Console settings are usually temporary, like environment variables, aliases etc. They disappear when you close the console or disconnect SSH. To make them permanent you have to put the settings to cofiguration files. These are specific files that are read when the console is started.
 +
||
 +
-  always permanent
 +
||
 +
-  usually permanent but could be changed to temporary
 +
</quiz>
 +
{{hidden end}}
 +
 
 +
 
 +
{{hidden begin
 +
|title = 4. What do locales contain?
 +
}}
 +
<quiz display=simple>
 +
{
 +
|type="()"}
 +
-  privacy settings
 +
||
 +
-  network settings
 +
||
 +
+  language settings
 +
||  A Locale is a place or locality, especially with reference to events or circumstances connected with it. Linux determines language and keyboard settings with locales.
 +
</quiz>
 +
{{hidden end}}
  
{{Warning|mode=warn|text= '''no warnings in this section'''}}
 
  
 +
{{Warning|mode=warn|text= ''' Be very careful, when editing configuration files. A faulty configuration file may prevent a user from login to computer'''}}
  
  
 
{{Note|'''Exercises in Terminal: no exercises in this section'''}}
 
{{Note|'''Exercises in Terminal: no exercises in this section'''}}
 +
 +
{{Tutorial Navigation
 +
| previous = [[Introduction_to_Linux_in_HPC/Environment_variables | Environment Variables ]]
 +
| main = [[Introduction_to_Linux_in_HPC | Overview ]]
 +
| next = [[Introduction_to_Linux_in_HPC/SSH_Connections | SSH Connections]]
 +
}}

Latest revision as of 17:25, 4 December 2020

Tutorial
Title: Introduction to Linux in HPC
Provider: HPC.NRW

Contact: tutorials@hpc.nrw
Type: Multi-part video
Topic Area: HPC Platforms
License: CC-BY-SA
Syllabus

1. Background and History
2. The Command Line
3. Linux Directory Structure
4. Files
5. Text display and search
6. Users and permissions
7. Processes
8. The vim text editor
9. Shell scripting
10. Environment variables
11. System configuration
12. SSH Connections
13. SSH: Graphics and File Transfer
14. Various tips

This part of the Linux tutorial shows possibilies of system configuration a normal user can do without having root access. Typical aspects in this context like reading system information files, defining aliases, adjusting configuration files and changing locales are taught in this lecture.

Video

( Slides as pdf)

Quiz

1. In which system file could you find the CPU information of a Linux computer?

/dev/cpuinfo
/sys/cpuinfo
/proc/cpuinfo


2. How is it possible to define aliases?

alias name='command'
alias 'command'=name
'command'=alias name


3. Console settings are...

usually temporary but could be changed to permanent
always permanent
usually permanent but could be changed to temporary


4. What do locales contain?

privacy settings
network settings
language settings


Warning:  Be very careful, when editing configuration files. A faulty configuration file may prevent a user from login to computer


Note: Exercises in Terminal: no exercises in this section


<< Environment Variables

Overview

SSH Connections >>