Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions docs/connect/work.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ uploadhpc file.txt /path/to/destinationOnHPC
If the connection is successful, you should see something like this:
![Successful-login](./images/success_connect.png)

# Connection to HPC
## Connection to HPC

When using a supercomputer, you will usually first connect to a front-end or access node. From this machine, you can check your files, disk quota and computing usage. It is intended to be used by the user to prepare his computing job and scripts and then submit them to the job scheduler.

Because the access node is shared by all the users of the platform, it should not be used to compile and install your software and it should definitely not be used to run any memory or computing-intensive task.

# Linux Command Cheat Sheet
## Linux Command Cheat Sheet

## Basic Commands
### Basic Commands

- `ls`: List directory contents.
- `ls -l`: Detailed listing (long format).
Expand Down Expand Up @@ -63,23 +63,23 @@ Because the access node is shared by all the users of the platform, it should no
- `tail [file]`: Display the last 10 lines of a file.
- `tail -f [file]`: Follow the end of the file in real-time.

## File Permissions
### File Permissions

- `chmod [permissions] [file]`: Change file permissions.
- Example: `chmod 755 script.sh`

- `chown [user]:[group] [file]`: Change file owner and group.
- Example: `chown user:group file.txt`

## File Compression
### File Compression

- `tar -czvf [archive.tar.gz] [directory]`: Create a compressed tarball.
- `tar -xzvf [archive.tar.gz]`: Extract a compressed tarball.

- `zip [archive.zip] [file]`: Create a zip file.
- `unzip [archive.zip]`: Extract a zip file.

## Process Management
### Process Management

- `ps`: Display currently running processes.
- `ps aux`: Detailed information about all running processes.
Expand All @@ -91,25 +91,25 @@ Because the access node is shared by all the users of the platform, it should no

- `htop`: Enhanced process viewer (requires installation).

## Networking
### Networking

- `ifconfig`: Display network interfaces and IP addresses.
- `ping [host]`: Check connectivity to a host.
- `ssh [user]@[host]`: Connect to a remote host via SSH.
- `scp [source] [user]@[host]:[destination]`: Secure copy files to/from a remote host.

## Disk Usage
### Disk Usage

- `df -h`: Display disk space usage.
- `du -sh [directory]`: Display the size of a directory and its contents.

## System Information
### System Information

- `uname -a`: Display detailed system information.
- `uptime`: Show how long the system has been running.
- `free -h`: Display memory usage.

## Text Processing
### Text Processing

- `grep [pattern] [file]`: Search for a pattern in a file.
- `grep -r [pattern] [directory]`: Recursively search for a pattern in a directory.
Expand All @@ -118,7 +118,7 @@ Because the access node is shared by all the users of the platform, it should no

- `awk '{print $1}' [file]`: Extract specific fields from a file.

## Miscellaneous
### Miscellaneous

- `man [command]`: Display the manual page for a command.
- `echo [text]`: Display a line of text.
Expand All @@ -127,7 +127,7 @@ Because the access node is shared by all the users of the platform, it should no
- `alias [name]='[command]'`: Create an alias for a command.


## HPC-Specific Commands
### HPC-Specific Commands

- `squeue`: Display the job queue.
- `sbatch [script.sh]`: Submit a batch script.
Expand All @@ -136,19 +136,19 @@ Because the access node is shared by all the users of the platform, it should no

More information about the commands can be found in ...

# Text Editors
## Text Editors

When working on the HPC, you will need to edit files and scripts. The most common text editors on Linux are `nano`, `vim`, and `emacs`. Here is a brief overview of each:

## Nano
### Nano

Nano is a simple and user-friendly text editor that is easy to use for beginners. It is a good choice for quick edits and small files.

- Open a file: `nano [file]`
- Save a file: `Ctrl + O`
- Exit nano: `Ctrl + X`

## Vim
### Vim

Vim is a powerful and highly configurable text editor that is popular among developers and system administrators. It has a steep learning curve but offers advanced features and customization options.

Expand All @@ -162,7 +162,7 @@ In normal mode, you can navigate the file using the arrow keys or `hjkl` (left,

It is recommended to learn the basics of Vim to be more productive when working on the HPC.

## Emacs
### Emacs

Emacs is a powerful and extensible text editor that is popular among programmers and power users. It has a steep learning curve but offers advanced features and customization options.

Expand All @@ -172,7 +172,7 @@ Emacs is a powerful and extensible text editor that is popular among programmers

Emacs has a wide range of features and modes that can be customized to suit your workflow. It is highly extensible and can be used for programming, writing, and more.

## Nvim
### Nvim

Nvim is a fork of Vim that aims to improve the user experience and add new features. It is compatible with Vim plugins and configurations but offers additional functionality and performance improvements.

Expand All @@ -186,7 +186,7 @@ Nvim is a fork of Vim that aims to improve the user experience and add new featu
micromamba install --name editor-env conda-forge::nvim
```
After installation you can create a alias in your `.bashrc` for easy access:
```bash
```bash
alias nvim='micromamba run --name editor-env nvim'
```
<!--neovin-install-end-->
Expand Down