# Intro to Unix ###### tags: `code` ## Shells You use a shell (we're using bash) to interact with an operating system. We are using Linux, Ubuntu (particular flavor of Unix) ## File System Organization - organizes your work into folders - several layers of 'nested' folders, you often have to think relative to yourself when working in the directory - folder navigation always relative to the current directory ## Commands All commands have the following format: VCM:~$ command parameters outputs Good commands: Up and down arrows will show you previous commands you've typed before - `cd` = change directory 1) `.` -> stays same place 2) `..` -> moves you one step up parent directory 3) `../..` -> moves you two steps up to even bigger parent directory 4) `subdirectory/` hit tab key twice and will show possibilities 5) if you just type `cd` with nothing else, it will take you home - `mkdir` - `rmdir` - `cp` = copy - `mv` = move - `rm` = remove - `gzip` = decompress (ex. `gzip -d dmel-all-tRNA-r6.45.fasta.gz`) - `scp` = secure copy - echo "test" > textme.txt - now login to wherever you want to move the file to: - scp -i .ssh/IDKEY labuser@34.148.164.14:~testme.txt - `sftp` = secure transfer file - `wget` = grabbing stuff from online ## Conda Environment - conda is a software tool for managering installed software. You create an environment for whatever you are working on. ``` conda info --envs ``` We're using BioInfo Conda environment ``` conda info bioinfo ``` to get out you can type `conda deactivate` ``` conda list ``` will tell you everything in this conda environment ``` conda create -n myblast conda activate myblast ``` Threads = way to specify how many working units at once? Each CPU can use 2 threads; Each CPU core can have two threads. So a processor with two cores will have four threads. A processor with eight cores will have 16 threads. `-t #of threads`