---
# System prepended metadata

title: Work with linux servers
tags: [Guide]

---

---
title: Work with linux servers
tags: Guide
---

# Sites
## ntugrid5

:::info
* **Never store fat data in your home directory.**  
    * Only limited home space shared by all people.  
    * Storage space specified for work is on both lxplus / ntugrid5.  
    * Ask seniors to create your own work space!!
* **Never run heavy jobs on the UI.** Use computing nodes  
    * If your job lasts for over 10 minutes, ask seniors how to use nodes/queues.  
    * Usually, we log into `ntugrid5`, and then pick a random node in `tmux` panes.  
    * Always redirect the long work log to file(s) instead of printing to screen.
:::

* You may need VO and grid certificate to access WLCG resources.
* Batch service system is [PBS](https://www.altair.com/pbs-works-documentation/).
* Put `alias nodes='$(printf "ssh -YC node%02d" $((${RANDOM} % 20 + 1)))'` to `.bashrc` to pick random computing note via a `nodes` command.

## lxplus

* [lxplus service doc](https://lxplusdoc.web.cern.ch/)
* [CERN batch service doc](https://batchdocs.web.cern.ch/index.html)
* [CRAB](https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideCrab) and [WLCG](https://wlcg.web.cern.ch/)

# Tools

## tmux

`Tmux` is a tool to create an offline thread for your program.

Basic functions:

```
tmux [a] 			# Create or attach to a screen
<C-b>				# Leader key of tmux, usually mapped to <C-a>
Leader d 			# Detach a session
Leader “number” 		# Jump to window “number”
Leader c/s/v/z/x 		# Create/Split/Vertical split/Zoom/Kill window
```
* For all functions, see [example configuration](https://github.com/pohsun/dotfiles/blob/master/tmux.conf).
* It’s not allowed to run a `tmux` in another `tmux`.
* One key install: `/wk_cms/pchen/commonTools/software/tmux/install.sh`

## Batch services


# FAQ

* How could I login with windows?

    If you want to login from windows. Use [xshell](https://www.netsarang.com/en/xshell/) and [Xming](
http://www.straightrunning.com/XmingNotes).