Loading
2014. 9. 28. 14:44 - Phil lee

Linux General Information on Blogspot

 

20140927 Learning how to mount from my co-worker in deatil

Tips) How to install zshell !

in Sudo authority, check the disk in in your Linux
>> fdisk -l
>> df -h

If not, you should partition the disk first
>> fdisk /dev/sdb 
>> m for help
>> n for adding a new partition
>> p for primary
>> w

>> fdisk -l : checking it is right


Format file_system of the new disk
>> mkfs.ext4 /dev/sdb1

So far, completing the formatting of the new disk
then we should mount the new disk from the root to the local disk.

How to do it?
- mkdir some folder in your local disk
- sudo mount /dev/sdb1 the folder name/ -t ext4

Then Change the folder's authority to yours
>>sudo chown jjoon ./the folder name.


Tips) How to install zshell !
http://gumdaeng.com/2014/05/23/zsh-install/

Pictures)

 

    



http://byjoo.tistory.com/entry/etcfstab linux
기본

  Thanks        gumdaengei

 Taking a note about xPad
Python lecture
2 Papers
Datamining
Textbook 4,5 Chapters

Degree (Graph theory)
- The degree of a vertex of a graph is the number of edges incident to the vertext with loops counted twice.

Hadoop) In order to execute some program, its extension should be .jar file, not .java file.

jar -cvf
생성할파일.jar 해당폴더명


hadoop fs -copyFromLocal abc.txt /input
hadoop fs -copyToLocal /output .

hadoop fs -rmr
hadoop jar WordCount.jar /input/abc.txt /output

1) javac WordCount.java
2) jar cmf main.txt WordCount.jar WordCount*.class
To set up which is Main class
3) in main.txt Main-Class: WfordCount

./oh_my-zsh
./tools/theme_chooser.sh
vim ~/.zshrc // being able to choose theme

In vim
command vs, sp

Ctrl + z / fg
python multiply.py matrix.json | more
>>>help()
tmux new -s tmux_window
tmux attach - t tmux_window
Ctrl + B / D, : 

 

 

 

0908 How to analyze source codes on vim on Linux

 

1. installing vim, ctags, cscope

-cscope install : 

http://iamroot.org/wiki/doku.php?id=%EC%8A%A4%ED%84%B0%EB%94%94:cscope_%EC%82%AC%EC%9A%A9%EB%B2%95
2. Source Explorer, NERD Tree, Tag List

source explorer: Tag 기반으로 동작하는 source code explorer 함수 선언 등을 쉽게 있게 준다. 함쉬에 커서를 올려놓으면 저절로 해당 함수의 선언부가 source explorer 뜬다.

NERD Tree: vim 쓰는 동시에 filesystem 탐색할 있게 해준다. 디렉토리에 들어가거나 파일을 있다. 창을 바꾸지 않아도 다른 파일을 쉽게 열고 확인할 있어서 편하다.

Tag List: 그대로 tag list 생성한다. 소스 코드를 쉽게 파악할 있게 해주며, 원하는 함수 혹은 변수 선언부로 쉽게 이동할 수있다.


3.~/.vimrc

I am too lazy.

 

Reference) 

http://gumdaeng.com/2013/11/07/vim-and-plugins-for-src-analysis/

Tips) Putty zmodem

 

 

0904 How to make authorized_key from ssh, meaning it can log in Server without password

How to make authorized_key from ssh, meaning it can log in Server without password as long as we have public key.

How to do it
>sudo apt-get install ssh
>ssh-keygen -t rsa
>ls -al ~/.ssh/    ( Checking id_rsa.pub exists )
>cat  id_rsa.pub >> authorized_keys
>sudo chmod 700 ~/.ssh
>sudo chmod 700 ~/.ssh/id_rsa
>sudo chmod 700 ~/.ssh/authorized_keys

Now, we should do change a port relating to Server because a port, '20', used by remote client is blocked by KAIST.

>sudo vim /etc/ssh/sshd_config
>In it, check
>Chang the Port and PasswordAuthentication Yes-> No


>sudo service ssh restart

But just for your information, if you want to connect in Windows' putty,
you should convert (id_rsa) to (.ppk) extension file.

It has a lot of work.
Actually, before I wrote this paper, I did many things wrong.
That means I turned around a right way to do this.

Download puttygen.exe on Website / http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html /

Then open this program > import a key from id_rsa made by ssh-keygen -t rsa
> Save a private key > by using this key, now we can log in Server through Putty
> How to do it? > Open putty > SSH > Auth > 'Browse' the private file > Connect!

Finished

 

 

 

 

0903 How to partition a new disk and format filesystem of the new disk

 

Partitioning a new disk
>sudo -s
>fdisk -l


>fdisk /dev/sdb : partitioning a new disk
>m for help
>n for adding a new partition
>p for primary
>w

>fdisk -l  : checking it's right

Format file_system of the new disk
>mkfs.ext4 /dev/sdb1

 

 

How to know computer specification on Ubuntu


information about HDD or SSD
:>df -h

information about memory and cpu
:>cat /proc/meminfo or cpuinfo

information about Ubuntu version
:>cat /etc/issue