리눅스
UBUNTU 리눅스에서 'cal' 명령어가 먹히지 않을 때
Jude_Juu
2023. 10. 24. 11:39
리눅스 환경에서 명령프롬프트를 실행시키는 프로그램 UBUNTU에서 cal 툴을 사용하려고 할 때,
명령어가 실행이 되지 않을 때가 있다.
mj@ubuntu:~$ cal
Command 'cal' not found, but can be installed with:
sudo apt install ncal
이러한 경우는 bsdmainutils 설치를 해주면 금방 해결이 된다.
1. sudo apt-get update -y
2. sudo apt-get install -y bsdmainutils
or
1. sudo apt update
2. sudo apt install bsdmainutils
3. Do you want continue? [Y/n] - y
mj@ubuntu:~$ sudo apt-get update -y
Hit:1 http://ports.ubuntu.com/ubuntu-ports jammy InRelease
Hit:2 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease
Hit:3 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease
Hit:4 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease
Reading package lists... Done
mj@ubuntu:~$ sudo apt-get install -y bsdmainutils
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
ncal
Suggested packages:
calendar whois vacation mailutils
The following NEW packages will be installed:
bsdmainutils ncal
0 upgraded, 2 newly installed, 0 to remove and 23 not upgraded.
Need to get 22.8 kB of archives.
After this operation, 89.1 kB of additional disk space will be used.
Get:1 http://ports.ubuntu.com/ubuntu-ports jammy/universe arm64 ncal arm64 12.1.7+nmu3ubuntu2 [19.6 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports jammy/universe arm64 bsdmainutils all 12.1.7+nmu3ubuntu2 [3,170 B]
Fetched 22.8 kB in 1s (20.1 kB/s)
Selecting previously unselected package ncal.
(Reading database ... 203590 files and directories currently installed.)
Preparing to unpack .../ncal_12.1.7+nmu3ubuntu2_arm64.deb ...
Unpacking ncal (12.1.7+nmu3ubuntu2) ...
Selecting previously unselected package bsdmainutils.
Preparing to unpack .../bsdmainutils_12.1.7+nmu3ubuntu2_all.deb ...
Unpacking bsdmainutils (12.1.7+nmu3ubuntu2) ...
Setting up ncal (12.1.7+nmu3ubuntu2) ...
Setting up bsdmainutils (12.1.7+nmu3ubuntu2) ...
Processing triggers for man-db (2.10.2-1) ...
Scanning processes...
Scanning linux images...
Running kernel seems to be up-to-date.
No services need to be restarted.
No containers need to be restarted.
No user sessions are running outdated binaries.
No VM guests are running outdated hypervisor (qemu) binaries on this host.
mj@ubuntu:~$ sudo apt update
Hit:1 http://ports.ubuntu.com/ubuntu-ports jammy InRelease
Hit:2 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease
Hit:3 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease
Hit:4 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
23 packages can be upgraded. Run 'apt list --upgradable' to see them.
mj@ubuntu:~$ sudo apt install bsdmainutils
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
bsdmainutils is already the newest version (12.1.7+nmu3ubuntu2).
0 upgraded, 0 newly installed, 0 to remove and 23 not upgraded.
이 이후에 'cal' 명령어 입력 시 calendar 출력을 확인할 수 있다.
mj@ubuntu:~$ cal
October 2023
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31