create new tag
view all tags

Basic Linux commands

Here I will write some of the basic commands we use in the terminal and what they do.

1) The mkdir command: This will create a folder ( i.e. make a directory).

syntax: mkdir 'mydocuments'

2) mkdir --verbose: This will create a directory and you will be told by the computer that it has been created

for example:


3) If you want to check the list of files or directories in your current directory : ls or ls -l)

If you type ls -l you'll see a list along with information about it.

4) cp

This is the copy command.

5) man

This is one of the most important commands you will use. This is the manual command and it is used to find detailed information about other commands including itself.

For example if you want more details about the copy command you would write:

man cp

You should see something like this:


6) nano

The nano command is a small, free and friendly editor which aims to replace Pico, the default editor included in the non-free Pine package.

Rather than just copying Pico's look and feel, nano also implements some missing

(or disabled by default) features in Pico, such as "search and replace" and "go to line and column number".

The information comes from following website Linux tutorials .

CMS Data Analysis Pre-Exercises (First Set)

Here I will talk about my experience learned from these exercises, which have the purpose to prepare students who,like me, will be exposed to CMS Data Analysis.

At the bottom of this topic I will post the link to the original page for those who want to participate.

I will not go into the details (that's why I posted the original link), but the first thing we have to do is to get a CERN account. After that you will need to get the necessary certificates and finally a github account. NOTE ( In this and every other execercise I used the UPRM syntax).

After you've done these things we are ready to begin !

In the first exercise we need to do a simple Cut and Paste. For this I used the cp command to do this we sign in to the corresponding cluster (in my case UPRM) and copied the file named runThisCommand.py

Here's what you write:

ssh -Y USERNAME@alpha00.hep.uprm.edu

cp ~malik/CMSTutorial/runThisCommand.py .

and then cut and paste the following and then hit return

./runThisCommand.py "asdf;klasdjf;kakjsdf;akjf;aksdljf;a" "sldjfqewradsfafaw4efaefawefzdxffasdfw4ffawefawe4fawasdffadsfef"

The response should be your username followed by alphanumeric string of characters unique to your username, for example for a user named malik:

(If done succesfully the output should be )

success: malik znyvx 

Exercise 2

After this we move on to the second exercise which is a simple edit exercise.

First we have to copy the file

cp ~malik/CMSTutorial/editThisCommand.py .

Here we will open this file using the "nano" command and edit the text inside it. In this case we are asket to change the 11th line and add "#" at the start of the line. After this save the file and copy paste the following:


Again like the last exercise there is a specific output if done correctly (check with the original page).

Exercise 3

In this exercise we will setup the github account and create a Working Directroy

### If you are using csh shell
setenv SCRAM_ARCH slc6_amd64_gcc491
### If you are using Bash shell
export SCRAM_ARCH=slc6_amd64_gcc491
cmsrel CMSSW_7_3_0_pre1
cd CMSSW_7_3_0_pre1/src
git cms-init

You will be prompted to fill some information for your github account, after this Run the following command:


We have finished the exercise.

I will skip Exercise 4 since I did not have the certificates necessary for this part.

The original page is here

-- Guillermo Fidalgo - 2016-05-10


Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng Screenshot_from_2016-03-15_110318.png r1 manage 33.8 K 2016-03-15 - 15:04 UnknownUser  
PNGpng Screenshot_from_2016-03-15_110608.png r1 manage 24.6 K 2016-03-15 - 15:07 UnknownUser  
PNGpng mandisplay.png r1 manage 48.8 K 2016-05-10 - 03:12 UnknownUser  
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2016-05-10 - GuillermoFidalgo
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback