Linux2019. 1. 23. 13:56

openSUSE로 깔린녀석의 ifconfig를 보니

특이하게도 eth0라던가 이런게 아닌 다른게 있네?

그리고 centos / dell poweredge는 em0로 뜨네..


룰은 좀더 찾아 봐야겠다...

Names incorporating Firmware/BIOS provided index numbers for on-board devices (example: eno1)

Names incorporating Firmware/BIOS provided PCI Express hotplug slot index numbers (example: ens1)

Names incorporating physical/geographical location of the connector of the hardware (example: enp2s0)

Names incorporating the interfaces's MAC address (example: enx78e7d1ea46da)

Classic, unpredictable kernel-native ethX naming (example: eth0) 

[링크 : https://unix.stackexchange.com/.../why-is-my-ethernet-interface-called-enp0s10-instead-of-eth0]


간단하게 이해하자면.. eth0 이런식으로 되는건 물리적 위치에 따른 이름이 아니라서 랜카드가 여러개일 경우에는 혼동이 올수도 있다. 정도인가?

Change the network device naming scheme from ethX to a physical location-based name for easy identification and use.


Systems, particularly servers, with multiple network ports, name the ports ethX in a non-deterministic order, and are therefore not useful for system administrators. 

[링크 : https://fedoraproject.org/wiki/Features/ConsistentNetworkDeviceNaming]

  [링크 : https://ubuntuforums.org/showthread.php?t=2150517]


인터페이스 이름 변경하기

ifconfig em1 down

ip link set em1 name eth0

ifconfig eth0 up 

[링크 : https://onecellboy.tistory.com/166]

'Linux' 카테고리의 다른 글

bacahe(SSD) + RAID(HDD), 그리고 bcache(ramfs) + RAID(HDD)  (0) 2019.02.01
bash builtin 명령어 .  (0) 2019.01.28
getopt()  (0) 2018.11.12
mount -o codepage=cp949  (0) 2018.01.04
taint kernel?  (0) 2017.12.03
Posted by 구차니
Linux/Ubuntu2018. 12. 19. 11:04

ubuntu 16.04

/usr/share/cups/data/testpage

/usr/share/cups/data/default-testpage.pdf

[링크 : https://askubuntu.com/questions/47815/where-can-i-find-the-default-printing-test-page]



+

centos 7 에서 확인

[root@localhost data]# ll

합계 48

-rw-r--r-- 1 root root 39852  8월  3  2017 default-testpage.pdf

-rw-r--r-- 1 root root   845  8월  3  2017 default.pdf

-rw-r--r-- 1 root root   234  8월  3  2017 testprint


[root@localhost data]# file *

default-testpage.pdf: PDF document, version 1.5

default.pdf:          PDF document, version 1.5

testprint:            ASCII text 


[root@localhost data]# cat testprint

#PDF-BANNER

Template default-testpage.pdf

Show printer-name printer-info printer-location printer-make-and-model printer-driver-name printer-driver-version paper-size imageable-area job-id options time-at-creation time-at-processing


[링크: https://forums.opensuse.org/showthread.php/478727-CUPS-test-page]

'Linux > Ubuntu' 카테고리의 다른 글

우분투 터치패드 휠 클릭 흉내내기  (0) 2019.05.04
ubuntu 18.04 kvm 설치하기  (0) 2019.04.30
epson 프린터 유틸리티 관련  (0) 2018.12.18
lpstat  (0) 2018.12.18
lp lpr  (0) 2018.12.18
Posted by 구차니
Linux/Ubuntu2018. 12. 18. 19:17

드라이버 안깔고는 안해봤네..

Epson L805 가지고 노는중


[링크 : https://epson.com/Support/wa00821]

[링크 : http://download.ebz.epson.net/faq/linux/inkjetprinter.html]

[링크 : http://download.ebz.epson.net/man/linux/]


제조사 제공은 아님

[링크 : https://linux.die.net/man/1/escputil]


-r /dev/usb/lp0 식으로 쓴다면 -P로 명칭을 쓸 수 있다는데

L805에 맞는 적당한 명칭을 찾지 못하겠다...

그리고 -P로는 잉크청소라던가 여러가지 기능은 못쓰게 제한 되는 듯?

$ escputil -P Stylus-C45 -m C45 -u -c 

[링크 : https://enggaraguilera.wordpress.com/2008/01/02/my-lovely-escputil/]

'Linux > Ubuntu' 카테고리의 다른 글

ubuntu 18.04 kvm 설치하기  (0) 2019.04.30
ubuntu test page 위치  (0) 2018.12.19
lpstat  (0) 2018.12.18
lp lpr  (0) 2018.12.18
ubuntu desktop shortcut  (0) 2018.12.06
Posted by 구차니
Linux/Ubuntu2018. 12. 18. 19:12

lp lpr lpadmin lpstat 등등

line printer 관련 명령어들인데 lpstat은 queue 관련을 볼 수 있는 듯?

[링크 : https://en.wikipedia.org/wiki/Line_printer]

[링크 : https://askubuntu.com/questions/37247/is-there-an-easy-way-to-view-the-print-queue]

[링크 : https://www.cups.org/doc/man-lpstat.html]

'Linux > Ubuntu' 카테고리의 다른 글

ubuntu test page 위치  (0) 2018.12.19
epson 프린터 유틸리티 관련  (0) 2018.12.18
lp lpr  (0) 2018.12.18
ubuntu desktop shortcut  (0) 2018.12.06
do-release-upgrade와 apt-get dist-upgrade  (0) 2018.09.28
Posted by 구차니
Linux/Ubuntu2018. 12. 18. 19:10

'Linux > Ubuntu' 카테고리의 다른 글

epson 프린터 유틸리티 관련  (0) 2018.12.18
lpstat  (0) 2018.12.18
ubuntu desktop shortcut  (0) 2018.12.06
do-release-upgrade와 apt-get dist-upgrade  (0) 2018.09.28
tmux  (0) 2018.08.13
Posted by 구차니
Linux/Ubuntu2018. 12. 6. 15:17

좀 귀찮게 먼가 콘솔로 치던가 다른 유틸로 만들던가..

탐색기에서 만드는 법은 없나...?


[링크 : https://linuxconfig.org/how-to-create-desktop-shortcut-launcher-on-ubuntu-18-04-bionic-beaver-linux]

'Linux > Ubuntu' 카테고리의 다른 글

lpstat  (0) 2018.12.18
lp lpr  (0) 2018.12.18
do-release-upgrade와 apt-get dist-upgrade  (0) 2018.09.28
tmux  (0) 2018.08.13
우분투 자동 업데이트  (0) 2018.05.21
Posted by 구차니
Linux/centos2018. 12. 3. 17:13

_

2019.03.21

centos7 기준 아래 경로가 잘못되어 수정

# vi /usr/lib/systemd/system/servicename




# vi /usr/lib/systemd/service/servicename

[Unit]

Description = making network connection up

After = network.target


[Service]

ExecStart = /root/scripts/conup.sh


[Install]

WantedBy = multi-user.target


실제 서비스 등록

# chmod +x /root/scripts/conup.sh

# systemctl enable servicename  


[링크 : https://www.tecmint.com/create-new-service-units-in-systemd/]



+

node.js 경로줘서 실행하기


npm start --prefix path/to/your/app 


[링크 : https://stackoverflow.com/questions/36172442/how-to-npm-start-at-a-different-directory]


+

귀찮으니.. whereis로 찾아서

/bin/http-server 와(얘는 걍 스크립트)

/bin/node 를 만들어 주면 해결!(얘는 바이너리)

[링크 : http://leechwin.tistory.com/...usrbinenv-node-No-such-file-or-directory-에러가-발생하는-경우]



+

reload를 적용하려면 아래의 줄을 [service] 항목에 추가하면 되는 듯?

[Unit]

Description=The NGINX HTTP and reverse proxy server

After=syslog.target network.target remote-fs.target nss-lookup.target


[Service]

Type=forking

PIDFile=/run/nginx.pid

ExecStartPre=/usr/sbin/nginx -t

ExecStart=/usr/sbin/nginx

ExecReload=/bin/kill -s HUP $MAINPID

ExecStop=/bin/kill -s QUIT $MAINPID

PrivateTmp=true


[Install]

WantedBy=multi-user.target 


[링크 : https://www.shellhacks.com/systemd-service-file-example/]

Posted by 구차니
Linux/centos2018. 11. 16. 17:49

아래와 같이 하니 등록은 되는 듯?


# systemctl enable mariadb

Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.


# systemctl enable httpd

Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service. 


[링크 : https://www.liquidweb.com/kb/how-to-install-mysql-mariadb-on-centos-7/]

[링크 : http://blog.andrewc.com/2016/06/autostart-apache-on-centos-7-boot/]

Posted by 구차니
Linux2018. 11. 12. 15:55

optarg의 경우 루프를 돌고 나면 리셋 되기 때문에

해당 옵션 판별시 다른 변수로 반드시 저장을 해주어야 한다.

그렇지 않으면 '(null)' 이라는 문자열이 돌아온다.


[링크 : https://soooprmx.com/archives/4993]

[링크 : https://linux.die.net/man/3/getopt]

[링크 : https://www.gnu.org/software/libc/manual/html_node/Example-of-Getopt.html]

'Linux' 카테고리의 다른 글

bash builtin 명령어 .  (0) 2019.01.28
네트워크 인터페이스 명칭이 이상하다? enp0s0? em0?  (0) 2019.01.23
mount -o codepage=cp949  (0) 2018.01.04
taint kernel?  (0) 2017.12.03
limits.conf와 ulimit  (0) 2017.08.24
Posted by 구차니
Linux/Ubuntu2018. 9. 28. 06:59

'Linux > Ubuntu' 카테고리의 다른 글

lp lpr  (0) 2018.12.18
ubuntu desktop shortcut  (0) 2018.12.06
tmux  (0) 2018.08.13
우분투 자동 업데이트  (0) 2018.05.21
E: /var/lib/dpkg/lock 잠금 파일을 얻을 수 없습니다  (0) 2018.05.17
Posted by 구차니