Essentials for Command Line and Terminal
Using the Terminal
Traverse through directories and files using the terminal.
cd /path/to/directory
List all files in the current directory.
ls //you can also do a -ls to get more information
Create a new directory.
mkdir new_directory
Remove a file.
rm file_name //you can FORCE remove -rf (not really recommended unless you know what you are doing)
Remove a directory.
rm -r directory_name
Basic Git Commands
Initialize a new git repository.
git init
Clone a repository from GitHub.
git clone repository_url
Sanity check on your files
git status
Add a file to the staging area.
git add file_name
Commit changes to the repository.
git commit -m "commit message"
Push changes to the repository.
git push
Pull changes from the repository.
git pull
Conda Environment Management
Make sure you installed conda first
Create a new environment.
conda create --name myenv python=3.9
Activate the environment.
conda activate myenv
Deactivate the environment.
conda deactivate
If you need the environment part of your jupyter notebook, you can install the ipykernel package. While your in your activated environment, run the following commands.
pip install ipykernel
python -m ipykernel install --user --name=my-python3-kernel