Linux tips

Useful link(s)

37 Important Linux Commands You Should Know

Environmental setting

Create and edit ".bash_profile" in the home directory by using your favorite editor, if not exist. For instance:

$ vi ~/.bash_profile

and add the following lines to ~/.bash_profile:

if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

Create ".bashrc" in the home directory to set the prompt, add command-line path, and so on (optional). Below is an example of ".bashrc"

if [ "$PS1" ]; then

    # enable color support of ls and also add handly aliases

    alias ls='ls -FG'
    alias ll='ls -l'
    alias la='ls -A'
    alias cp='cp -i'
    alias mv='mv -i'
    alias rm='rm -i'

    # set a fancy prompt

    PS1='\u@\h:\w\$ '

fi

To add a command search path, add the following (for instance) to ~/.bashrc

export PATH=${PATH}:${HOME}/qe-6.2.1/bin:${HOME}/qe-6.2.1/PW/tools

(change path to and directory name for your QE program ("qe-6.2.1" for instance) as appropriate) and type

$ source ~/.bashrc

to make the change.

Information of CPU/memory

vmstat
cat /proc/cpuinfo 
cat /proc/meminfo
トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2023-01-23 (月) 11:57:00 (452d)