FuguItaGuide/2-Introduction
をテンプレートにして作成
Start:
#navi(FuguItaGuide)
This chapter describes the basic procedure when the syste...
We will also point out sources of information that may be...
#contents
#aname(firstlogin)
* Login for the first time [#cb54daf8]
**Log in as root [#j9dcb23b]
Once FuguIta has finished booting, you will be presented ...
At first, only the superuser account can log in, so enter...
OpenBSD/amd64 (fugu-demo.localnet) (tty00)
login: root
Password:
OpenBSD 7.2-stable (RDROOT.MP) #28: Fri Feb 3 11:29:19 ...
Welcome to FuguIta, the OpenBSD-based live system.
FuguIta aims to help popularize OpenBSD operating system...
to get started with.
For information on FuguIta's specific features and how t...
refer to the documentation on https://fuguita.org/.
If you have any questions or suggestions for FuguIta, pl...
me or post a message to fuguita.org's message board.
Please feel free to contact me.
Yoshihiro Kawamata
kaw@on.rim.or.jp , https://fuguita.org/
You have new mail.
fugu-demo#
If the login is successful, the shell prompt "fugu-demo#"...
As an example, let's run the command ps.
fugu-demo# ps -aux
USER PID %CPU %MEM VSZ RSS TT STAT STARTED ...
root 68528 3.6 0.1 868 884 00 Sp 6:51AM ...
root 1 0.0 0.1 884 532 ?? I 6:40AM ...
root 14453 0.0 0.1 792 644 ?? Ip 6:43AM ...
_slaacd 53995 0.0 0.1 812 784 ?? Ip 6:43AM ...
_slaacd 33982 0.0 0.1 800 732 ?? Ip 6:43AM ...
root 55401 0.0 0.1 712 548 ?? IU 6:44AM ...
_dhcp 78950 0.0 0.1 840 700 ?? Ip 6:44AM ...
root 86344 0.0 0.2 520 2184 ?? IpU 6:46AM ...
_syslogd 45328 0.0 0.1 1128 1488 ?? Sp 6:46AM ...
root 73380 0.0 0.1 836 584 ?? IU 6:46AM ...
_pflogd 53476 0.0 0.1 876 540 ?? Sp 6:46AM ...
_ntp 63935 0.0 0.3 1016 2868 ?? S<p 6:47AM ...
_ntp 18769 0.0 0.2 820 2508 ?? Ip 6:47AM ...
root 34145 0.0 0.2 788 1568 ?? S<pU 6:47AM ...
root 63360 0.0 0.1 1324 1280 ?? I 6:47AM ...
root 61566 0.0 0.2 1680 2052 ?? Ip 6:48AM ...
_smtpd 19845 0.0 0.4 1448 3940 ?? Ip 6:48AM ...
_smtpd 66321 0.0 0.4 1716 4240 ?? Ip 6:48AM ...
_smtpd 91561 0.0 0.4 1552 4164 ?? Ip 6:48AM ...
_smtpd 90688 0.0 0.4 1844 4396 ?? Ip 6:48AM ...
_smtpq 16446 0.0 0.4 1640 4252 ?? Ip 6:48AM ...
_smtpd 82450 0.0 0.4 1440 3988 ?? Ip 6:48AM ...
_sndio 66682 0.0 0.1 516 744 ?? I<p 6:48AM ...
_sndiop 92235 0.0 0.1 504 920 ?? IpU 6:48AM ...
root 1376 0.0 0.1 672 1268 ?? Sp 6:51AM ...
root 6575 0.0 0.0 484 360 00 R+pU/0 7:32AM ...
root 13541 0.0 0.1 288 1296 C0 I+pU 6:51AM ...
root 70324 0.0 0.1 292 1308 C1 I+pU 6:51AM ...
root 10475 0.0 0.1 296 1312 C2 I+pU 6:51AM ...
root 81779 0.0 0.1 292 1304 C3 I+pU 6:51AM ...
root 45364 0.0 0.1 284 1280 C5 I+pU 6:51AM ...
fugu-demo#
ps is a command that displays what programs (processes) a...
Even if the system is just starting up and it looks like ...
From now on, I will explain the settings that should be d...
*** Change time zone [#j329c68f]
FuguIta immediately after booting in mode 0 has the time ...
Japan Standard Time (JST) is 9 hours ahead of Coordinated...
fugu-demo# date
Fri Feb 10 05:14:49 UTC 2023
To change FuguIta's time zone to JST, enter the command a...
fugu-demo# cd /etc
fugu-demo# ls -l localtime
lrwxr-xr-x 1 root wheel 23 Feb 10 05:13 localtime -> ...
fugu-demo# ln -s -f /usr/share/zoneinfo/Asia/Tokyo local...
fugu-demo# ls -l localtime
lrwxr-xr-x 1 root wheel 30 Feb 10 14:15 localtime -> ...
fugu-demo# date
Fri Feb 10 14:15:44 JST 2023
fugu-demo#
>''[Memo]''~
''⇒''If the JST after setting is different from the actua...
#aname(adduser)
*** General user registration [#g69bab25]
Immediately after starting FuguIta, you can only log in w...
On a Unix-based OS, you normally log in as a general user...
When doing system administration, log back in as superuse...
>&color(red){''[Caution]''};~
&color(red){''!!''While logged in as the superuser, it is...
Below, create an account called yoshi as a general user. ~
Creating user accounts is also system management, so do i...
Use the command [[adduser>man:adduser.8]] to add a user a...
First, you will be asked for default values when adding a...
# adduser
Couldn't find /etc/adduser.conf: creating a new adduser ...
Reading /etc/shells
Enter your default shell: bash csh ksh nologin nsh sh [k...
Your default shell is: ksh -> /bin/ksh
Default login class: authpf bgpd daemon default pbuild s...
[default]:
Enter your default HOME partition: [/home]:
Copy dotfiles from: /etc/skel no [/etc/skel]:
Send welcome message?: /path/file default no [no]:
Do not send message(s)
Prompt for passwords by default (y/n) [y]:
Default encryption method for passwords: auto blowfish [...
Use option ``-silent'' if you don't want to see all warn...
Reading /etc/shells
Check /etc/master.passwd
Check /etc/group
Next, enter the information for general user account crea...
As shown at the beginning, the input can be corrected (re...
Ok, let's go.
Don't worry about mistakes. There will be a chance later...
Enter username []: yoshi
Enter full name []: Yoshihiro Kawamata
Enter shell bash csh ksh nologin nsh sh [ksh]:
Uid [1000]:
Login group yoshi [yoshi]:
Login group is ``yoshi''. Invite yoshi into other groups...
[no]: wheel
Login class authpf bgpd daemon default pbuild staff unbo...
[default]:
Enter password []:
Enter password again []:
Name: yoshi
Password: ****
Fullname: Yoshihiro Kawamata
Uid: 1000
Gid: 1000 (yoshi)
Groups: yoshi wheel
Login Class: default
HOME: /home/yoshi
Shell: /bin/ksh
OK? (y/n) [y]: y
Added user ``yoshi''
Copy files from /etc/skel to /home/yoshi
Add another user? (y/n) [y]: n
Goodbye!
#
>''[Memo]''~
''⇒''In this example, the account yoshi is also added to ...
Users with a wheel subscription can temporarily become ro...
A general user account called yoshi is now created.
***Give administrator privileges to a general user [#y2b9...
As explained in the previous section, to perform system a...
On OpenBSD, general users can execute commands with root ...
To use doas, you first need to edit the configuration fil...
doas.conf does not exist at first, so execute the followi...
# echo permit persist :wheel > /etc/doas.conf
# chmod 0600 /etc/doas.conf
This will create a file doas.conf with a single line "per...
>''[Memo]''~
''⇒''When you execute doas, you will be prompted for the ...
#aname(usbfadm_expand)
***Extend the storage area of the USB memory [#k9cd1e38]
As explained in [[Creating a FuguIta LiveUSB>fge1:create_...
However, this LiveUSB version of FuguIta can only use 2GB...
Of this, the FuguIta system occupies about 1GB, so usbfad...
The usbfadm utility that comes with FuguIta has a feature...
Below is an example of using usbfadm expand.
fugu-demo# usbfadm ← start usbfadm with root privileges
Welcome to usbfadm.
USB flash drive administration tool for FuguIta
Version/Arch: 7.2/amd64 (FuguIta-7.2-amd64-202302081)
Boot mode: manual
Target device: not set
Data saved as: not set
readline capability available
TAB to complete the reserved words
Type ? for help.
? : ? ->target ← Specify the partition to extend with t...
Searching storage device
Please make sure the device inserted.
Then press ENTER ->
sd0i sd0j sd0k sd1a +sd1d vnd5a ← list of detected part...
target device ->sd1d Partitions with a + ...
are data storage par...
sd1d : ? ->info ← check the capacity of the specified p...
Filesystem Size Used Avail Capacity iused ifr...
/dev/sd1d 1.1G 2.5K 1.1G 0% 5 1287065 0%...
scanning...
512B 7.0/amd64/noasks
sd1d : ? ->expand ← call expand function
Select the expansion method for sd1d:
1: growfs - expands the partition while retaining its...
2: newfs - expand and format the partition
3: [exit without expansion]
->2 ← extend partition using "newfs"
There are two ways to extend a partition: "growfs" and "n...
growfs expands the area while retaining the data stored i...
newfs reformats the partition after expanding the space. ~
Please note that newfs will erase all saved files and dir...
it is recommended that you back up your data before runni...
This makes sd1d as large as possible.
Note that all contents in sd1d will be removed
Do you proceed? [y/N] -> y
/dev/rsd1d: 3136.5MB in 6423488 sectors of 512 bytes
257 cylinder groups of 12.24MB, 3134 blocks, 6272 inodes...
super-block backups (for fsck -b #) at:
144, 25216, 50288, 75360, 100432, 125504, 150576, 17564...
:
6368432, 6393504, 6418576,
** /dev/rsd1d
** File system is already clean
** Last Mounted on
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
1 files, 1 used, 5611214 free (14 frags, 701400 blocks, ...
sd1d : ? ->info ← check capacity after expansion
Filesystem Size Used Avail Capacity iused ifr...
/dev/sd1d 2.7G 2.5K 2.7G 0% 5 1611897 0%...
scanning...
512B 7.0/amd64/noasks
sd1d : ? ->quit
Bye bye...
fugu-demo#
>''[Memo]'' ~
''⇒''File system parameters (format type, block size, fra...
***logout [#m60f45ba]
Enter the exit command to terminate (logout) the account ...
fugu-demo# exit
OpenBSD/amd64 (fugu-demo.localnet) (tty00)
login:
**login as a general user [#p70c5caa]
We created a general user account in the previous section...
OpenBSD/amd64 (fugu-demo.localnet) (tty00)
login: yoshi
Password:
OpenBSD 7.2-stable (RDROOT.MP) #30: Wed Feb 8 13:07:26 ...
Welcome to FuguIta, the OpenBSD-based live system.
FuguIta aims to help popularize OpenBSD operating system...
to get started with.
For information on FuguIta's specific features and how t...
refer to the documentation on https://fuguita.org/.
If you have any questions or suggestions for FuguIta, pl...
me or post a message to fuguita.org's message board.
Please feel free to contact me.
Yoshihiro Kawamata
kaw@on.rim.or.jp , https://fuguita.org/
fugu-demo$ pwd
/ram/home/yoshi
fugu-demo$ ls
fugu-demo$ ls -a
. .Xdefaults .cvsrc .mailrc .ssh
.. .cshrc .login .profile
fugu-demo$
>''[Memo]''~
''⇒''When logged in as root, the shell prompt will be "fu...
Follow this notation in the following examples.
#aname(usbfadm_sync)
*** Save file to USB memory [#vbd70334]
FuguIta saves all data such as files created by the user,...
Run the usbfadm command to save the data. Usbfadm require...
fugu-demo$ doas usbfadm
doas (yoshi@fugu-demo.localnet) password:
Welcome to usbfadm.
USB flash drive administration tool for FuguIta
Version/Arch: 7.2/amd64 (FuguIta-7.2-amd64-202302081)
Boot mode: manual
Target device: /dev/sd0d
Data saved as: fugu-demo
readline capability available
TAB to complete the reserved words
Type ? for help.
? : ? ->
First, specify the destination partition using the target...
After confirming that the storage device is installed, pr...
Devices with a + sign in front of the device name are dev...
? : ? --> target
Searching USB flash drives
Please make sure the device inserted.
Then press ENTER ->
cd0a sd0a +sd0d
targe device--> sd0d
Then name the data you want to save using the saveas comm...
If the name is omitted, the host name will be used as the...
sd0d : ? --> saveas
Name of saved data --> fugu-demo
Your data will be saved as ``fugu-demo''.
Notice that the prompt string, which was originally "? : ...
The values ?k?kset by the target command and saveas just ...
Finally run the sync command to actually save the data.
/dev/sd0d : fugu-demo -> sync
Sync current mfs as fugu-demo, OK? -> y
building file list ... done
created directory /mnt/livecd-config/fugu-demo
./
etc/
etc/bgpd.conf
etc/boot.conf
:
:
var/yp/Makefile.yp
var/yp/Makefile.yp.dist
var/yp/README
sent 16455591 bytes received 232568 bytes 180412.53 by...
total size is 15492096 speedup is 0.93
Let's display the information of the data saved with the ...
/dev/sd0d : fugu-demo -> info
Filesystem Size Used Avail Capacity Mounted on
/dev/sd0d 218M 18.9M 179M 9.6% /mnt
scanning...
18.9M 6.0/amd64/fugu-demo
The data seems to be saved without problems, so exit usbf...
/dev/sd0d : fugu-demo -> bye
fugu-demo$
>''[Memo]''~
Saving with usbfadm can also be done from the shell comma...
fugu-demo$ doas usbfadm -r
doas (yoshi@fugu-demo.localnet) password:
========================================
= Sync current mfs as fugu-demo into /dev/sd0d
=
sending incremental file list
deleting etc/X11/xenodm/authdir/authfiles/A:0-G4H73h
:
var/spool/smtpd/purge/
var/spool/smtpd/temporary/
#
Option -r tells usbfadm to re-save the file. ~
~
You can also use cron to run periodically in the backgrou...
# crontab -l
#minute hour mday month wday command
--- omit ---
#save session periodically
0 */4 * * * PATH=$PATH:/usr/...
This causes usbfadm saves to happen in the background eve...
>''[Memo]''~
''⇒''You can use any partition that is formatted in the O...
***Exit Fuguita [#o83b9962]
To terminate FuguIta operation, log in as root and execut...
Or as a normal user, execute the shutdown command using t...
fugu-demo$ doas shutdown -h -p now
doas (yoshi@fugu-demo.localnet) password:
Shutdown NOW!
shutdown: [pid 4771]
fugu-demo$
*** FINAL System shutdown message from root@fugu-demo.lo...
System going down IMMEDIATELY
System shutdown time has arrived
fugu-demo$ syncing disks... done
In the above example, the -h option is specified as a spe...
In addition, since the -p option is specified at the same...
If you specify the -r option instead of the -h or -p opti...
In Fuguita, user-created data and system configuration fi...
The fact that the operations performed on Fuguita disappe...
In other words, deleting files, stopping processes, etc. ...
#aname(boot_mode3)
*** Read saved settings and files [#cee39c36]
The data saved by the method described in [[Save settings...
To restore the data, select mode 3 in the boot mode selec...
Boot modes:
0: fresh boot - standard mode as a live system
1: fresh boot - less memory, faster boot (/usr is non-...
2: fresh boot - works using only RAM (about 1GB or mor...
3: boot with retrieving saved files from storage device
or enter passphrase for an encrypted volume
4: boot with retrieving saved files from floppy disk
5: interactive shell for debugging
->3
scanning partitions: sd0a sd0d sd0i cd0a
Device(s) found:
loadable from: sd0d
Which is FuguIta's storage device? [default: sd0d] -> sd0d
/dev/sd0d : available data;
fugu-demo
config name -> fugu-demo
Copying files from flash to ram ...
If you specify the saved data name, the saved data will b...
Since all setting values ?k?kare restored, network settin...
at the beginning.
After logging in, you can also save more data. The proced...
And since the save device name and save name have already...
When shutting down, data is not saved automatically by de...
If you want to automate this, please set [[Save data auto...
*** Try starting the X Window System. [#vebc1691]
OpenBSD ships with a graphics environment called the X Wi...
>''[Memo]''~
''⇒''The X Window System may be abbreviated as ''X'' or '...
To use X, select X Window System as the login method as d...
Do you login with Console or X Window System?
[default: Console] -> x
When X starts up, the following login screen will be disp...
#ref(河豚板ガイド/xenodm-login.png,null,50%)
If the login is successful, the following screen will app...
#ref(河豚板ガイド/startx.png)
The white window on the upper left of the screen is calle...
A clock is displayed in the upper right corner. ~
The one on the bottom left is called "xconsole" and is a ...
Something like the table on the bottom right is called "v...
x 3 rows = 9 desktop screens.
The menu appears when you press the left mouse button on ...
X). From this menu you can select X apps to run. Those no...
The following screen is an example of actually running th...
#ref(河豚板ガイド/various-xclt.png,wrap)
In the root window, another menu is displayed by pressing...
>''[Memo]''~
''⇒''X operation is designed assuming operation with a 3-...
middle button, press both left and right buttons at the s...
To exit X, select "Exit" from the left mouse button menu,...
#ref(河豚板ガイド/quit-verify-win.png,wrap)
>''[Memo]''~
''⇒''OpenBSD has several types of software (desktop envir...
* Learning how to use Unix and OpenBSD [#naba8bbc]
#aname(useunix)
** Check how to use Unix-like OS [#h19a6ead]
As explained at the beginning of this guide, FuguIta is b...
Unix was developed in 1969, about half a century ago, and...
Unix-based operating systems are very different from oper...
Fundamentals of Unix-like OS are not made for consumer us...
What approach should be taken to understand and utilize s...
***Book preparation [#u17669c8]
Prepare a book that explains the basics of Unix-like oper...
There are various implementations of Unix-based OS, but t...
The content of the book should not be limited to specific...
It's hard to find a book that says "Read this one and you...
-はじめてUNIXで仕事をする人が読む本 / 木本雅彦 他 著 / ...
-新 The Unix Super Text [上] / 山口和紀・古瀬一隆 著 /...
Reading the following as supplementary readings may help ...
-Unixという考え方-その設計思想と哲学 / Mike Gancarz著 ...
-Linuxを「読む」 / こじまみつひろ著 / 毎日コミュニケー...
#aname(man)
*** Use the online manual [#k6e2dbd8]
After all, moving your hands by yourself is the basis for...
At that time, don't try blindly, but use the online manua...
>''[Memo]''~
''⇒''Unix online manuals are divided into several chapter...
Items with the same name may appear in multiple chapters.~
For example, "sleep" is found in both chapter 1 (general ...
$ man 1 sleep
If you are programming in C and want to know how to use t...
$ man 3 sleep
displays the description of the sleep function in Chapter...
~
Therefore, the notation such as "ls (1)" will appear afte...
>''[Memo]''~
''⇒''Online manuals are sometimes called manual pages. Th...
Apart from online manuals, many Unix commands have the ab...
$ man
usage: man [-acfhklw] [-C file] [-I os=name] [-K encodin...
[-O option=value] [-S subsection] [-s section...
[section] name ...
$ cp -?
cp: unknown option -- ?
usage: cp [-fip] [-R [-H | -L | -P]] source target
cp [-fip] [-R [-H | -L | -P]] source ... directory
The above example displays help messages for the man and ...
Since command help messages are so brief, they are often ...
*** Utilizing the net as "reference information" [#vbed8e...
Using the Internet, you can easily obtain information rel...
But it also has its weaknesses, as explained in the previ...
In addition, many Unix-like OSes now have "official sites...
***Summary [#x9df3154]
Applying the above to the topic "File Attributes", for ex...
-Grab the basics with books ~
→ Find out what the file owner/group/permissions are and ...
-Actual operation while checking online manual etc. ~
→ Actually execute chown, chgrp, chmod commands and check...
- Get related and reference information on the internet~
→Check out things to watch out for, things that are easy ...
→ Check related information on the official website ... I...
FuguIta is also suitable for learning Unix OS as mentione...
#aname(useopenbsd)
** Find out how to use OpenBSD [#hd212d2a]
In the previous section [[Find out how to use Unix>#useun...
***introduction [#f51dcbf5]
After logging in as root, you will receive an email from ...
# mail
Mail version 8.1.2 01/15/2001. Type ? for help.
"/var/mail/root": 1 message 1 new
>N 1 deraadt@do-not-re Sun Oct 18 07:58 86/4565 Wel...
& more 1
Message 1:
From deraadt@do-not-reply.openbsd.org Sun Oct 18 07:58:5...
Date: Oct 18 07:58:58 MST 2015
From: deraadt@do-not-reply.openbsd.org (Theo de Raadt)
To: root
Subject: Welcome to OpenBSD 5.8!
This message attempts to describe the most basic initial...
system administrator of an OpenBSD box might have. You ...
this message for later reference.
....continued....
This email addresses some of the first questions an OpenB...
There is some overlap with the content of this email belo...
*** documents in the system [#rd484046]
As mentioned in [[How to use Unix>#useunix]], online manu...
It is also emphasized in the mail addressed to root immed...
Again, PLEASE READ THE MANUAL PAGES. Our developers hav...
hours improving them so that they are clear and precise.
The man page also has some entries specifically for intro...
purposes.
:[[help>man:help.1]]|This entry is for Unix beginners. Th...
:[[man>man:man.1]]|Description of the man command. OpenBS...
:[[afterboot>man:afterboot.8]]|Explains items that should...
:intro|The manual page is divided into chapters by catego...
man 1 intro
means that the description of the general command categor...
man 5 intro
displays a general description of the file format category.
On OpenBSD, the man page chapters are
organized like this;
|1|General Commands|
|2|System calls and error numbers|
|3|Libraries|
|4|Device Drivers|
|5|File Formats|
|6|Games|
|7|Others|
|8|System maintenance commands|
|9|Kernel|
The content of each section of the manual continues to fo...
Also, in other Unix-based OS, chapter 4 (device driver) a...
>''[Memo]''~
''⇒''The online manual built into OpenBSD can be read wit...
In the FuguIta guide, you can refer to the online manual ...
#ref(河豚板ガイド/emacsinfo.png,around,right)
For commands originating from the GNU project and applica...
To view the Info document, run the [[info>man:info.1]] co...
>''[Memo]''~
''⇒''If you have additionally installed an Emacs editor, ...
#clear
There are application-specific documentation besides man ...
Info.
They are mainly located under the following directories:
-/usr/share/doc
-/usr/X11R6/share/doc
-/usr/local/share/doc
-/usr/local/share/gtk-doc
*** File on system [#a20dea4c]
All configuration files for servers and application softw...
///Software added by the package management tool ports/pa...
System operation logs are located under /var/log. Only cr...
Kernel messages displayed at boot time, as described in [...
in a file called /var/run/dmesg.boot. By viewing the cont...
*** Information on the Internet [#h9ec9da1]
:http://www.openbsd.org/|Official site run by the project...
:http://undeadly.org/|``OpenBSD Journal'' OpenBSD related...
:mailing list|[[officially managed mailing list>http://ww...
archive site for these, and you can view them on the web ...
*** Books [#y291b608]
As far as the author knows, no Japanese books written for...
2023. ~
Some books for BSD Unix,
-BSD HACKS ~
100 Techniques & Tools Used by Professionals / Written by...
Some books, such as, partially mention OpenBSD.
For English books, please refer to [[description on offic...
It seems that some books for OpenBSD have been published,...
#navi(FuguItaGuide)
End:
#navi(FuguItaGuide)
This chapter describes the basic procedure when the syste...
We will also point out sources of information that may be...
#contents
#aname(firstlogin)
* Login for the first time [#cb54daf8]
**Log in as root [#j9dcb23b]
Once FuguIta has finished booting, you will be presented ...
At first, only the superuser account can log in, so enter...
OpenBSD/amd64 (fugu-demo.localnet) (tty00)
login: root
Password:
OpenBSD 7.2-stable (RDROOT.MP) #28: Fri Feb 3 11:29:19 ...
Welcome to FuguIta, the OpenBSD-based live system.
FuguIta aims to help popularize OpenBSD operating system...
to get started with.
For information on FuguIta's specific features and how t...
refer to the documentation on https://fuguita.org/.
If you have any questions or suggestions for FuguIta, pl...
me or post a message to fuguita.org's message board.
Please feel free to contact me.
Yoshihiro Kawamata
kaw@on.rim.or.jp , https://fuguita.org/
You have new mail.
fugu-demo#
If the login is successful, the shell prompt "fugu-demo#"...
As an example, let's run the command ps.
fugu-demo# ps -aux
USER PID %CPU %MEM VSZ RSS TT STAT STARTED ...
root 68528 3.6 0.1 868 884 00 Sp 6:51AM ...
root 1 0.0 0.1 884 532 ?? I 6:40AM ...
root 14453 0.0 0.1 792 644 ?? Ip 6:43AM ...
_slaacd 53995 0.0 0.1 812 784 ?? Ip 6:43AM ...
_slaacd 33982 0.0 0.1 800 732 ?? Ip 6:43AM ...
root 55401 0.0 0.1 712 548 ?? IU 6:44AM ...
_dhcp 78950 0.0 0.1 840 700 ?? Ip 6:44AM ...
root 86344 0.0 0.2 520 2184 ?? IpU 6:46AM ...
_syslogd 45328 0.0 0.1 1128 1488 ?? Sp 6:46AM ...
root 73380 0.0 0.1 836 584 ?? IU 6:46AM ...
_pflogd 53476 0.0 0.1 876 540 ?? Sp 6:46AM ...
_ntp 63935 0.0 0.3 1016 2868 ?? S<p 6:47AM ...
_ntp 18769 0.0 0.2 820 2508 ?? Ip 6:47AM ...
root 34145 0.0 0.2 788 1568 ?? S<pU 6:47AM ...
root 63360 0.0 0.1 1324 1280 ?? I 6:47AM ...
root 61566 0.0 0.2 1680 2052 ?? Ip 6:48AM ...
_smtpd 19845 0.0 0.4 1448 3940 ?? Ip 6:48AM ...
_smtpd 66321 0.0 0.4 1716 4240 ?? Ip 6:48AM ...
_smtpd 91561 0.0 0.4 1552 4164 ?? Ip 6:48AM ...
_smtpd 90688 0.0 0.4 1844 4396 ?? Ip 6:48AM ...
_smtpq 16446 0.0 0.4 1640 4252 ?? Ip 6:48AM ...
_smtpd 82450 0.0 0.4 1440 3988 ?? Ip 6:48AM ...
_sndio 66682 0.0 0.1 516 744 ?? I<p 6:48AM ...
_sndiop 92235 0.0 0.1 504 920 ?? IpU 6:48AM ...
root 1376 0.0 0.1 672 1268 ?? Sp 6:51AM ...
root 6575 0.0 0.0 484 360 00 R+pU/0 7:32AM ...
root 13541 0.0 0.1 288 1296 C0 I+pU 6:51AM ...
root 70324 0.0 0.1 292 1308 C1 I+pU 6:51AM ...
root 10475 0.0 0.1 296 1312 C2 I+pU 6:51AM ...
root 81779 0.0 0.1 292 1304 C3 I+pU 6:51AM ...
root 45364 0.0 0.1 284 1280 C5 I+pU 6:51AM ...
fugu-demo#
ps is a command that displays what programs (processes) a...
Even if the system is just starting up and it looks like ...
From now on, I will explain the settings that should be d...
*** Change time zone [#j329c68f]
FuguIta immediately after booting in mode 0 has the time ...
Japan Standard Time (JST) is 9 hours ahead of Coordinated...
fugu-demo# date
Fri Feb 10 05:14:49 UTC 2023
To change FuguIta's time zone to JST, enter the command a...
fugu-demo# cd /etc
fugu-demo# ls -l localtime
lrwxr-xr-x 1 root wheel 23 Feb 10 05:13 localtime -> ...
fugu-demo# ln -s -f /usr/share/zoneinfo/Asia/Tokyo local...
fugu-demo# ls -l localtime
lrwxr-xr-x 1 root wheel 30 Feb 10 14:15 localtime -> ...
fugu-demo# date
Fri Feb 10 14:15:44 JST 2023
fugu-demo#
>''[Memo]''~
''⇒''If the JST after setting is different from the actua...
#aname(adduser)
*** General user registration [#g69bab25]
Immediately after starting FuguIta, you can only log in w...
On a Unix-based OS, you normally log in as a general user...
When doing system administration, log back in as superuse...
>&color(red){''[Caution]''};~
&color(red){''!!''While logged in as the superuser, it is...
Below, create an account called yoshi as a general user. ~
Creating user accounts is also system management, so do i...
Use the command [[adduser>man:adduser.8]] to add a user a...
First, you will be asked for default values when adding a...
# adduser
Couldn't find /etc/adduser.conf: creating a new adduser ...
Reading /etc/shells
Enter your default shell: bash csh ksh nologin nsh sh [k...
Your default shell is: ksh -> /bin/ksh
Default login class: authpf bgpd daemon default pbuild s...
[default]:
Enter your default HOME partition: [/home]:
Copy dotfiles from: /etc/skel no [/etc/skel]:
Send welcome message?: /path/file default no [no]:
Do not send message(s)
Prompt for passwords by default (y/n) [y]:
Default encryption method for passwords: auto blowfish [...
Use option ``-silent'' if you don't want to see all warn...
Reading /etc/shells
Check /etc/master.passwd
Check /etc/group
Next, enter the information for general user account crea...
As shown at the beginning, the input can be corrected (re...
Ok, let's go.
Don't worry about mistakes. There will be a chance later...
Enter username []: yoshi
Enter full name []: Yoshihiro Kawamata
Enter shell bash csh ksh nologin nsh sh [ksh]:
Uid [1000]:
Login group yoshi [yoshi]:
Login group is ``yoshi''. Invite yoshi into other groups...
[no]: wheel
Login class authpf bgpd daemon default pbuild staff unbo...
[default]:
Enter password []:
Enter password again []:
Name: yoshi
Password: ****
Fullname: Yoshihiro Kawamata
Uid: 1000
Gid: 1000 (yoshi)
Groups: yoshi wheel
Login Class: default
HOME: /home/yoshi
Shell: /bin/ksh
OK? (y/n) [y]: y
Added user ``yoshi''
Copy files from /etc/skel to /home/yoshi
Add another user? (y/n) [y]: n
Goodbye!
#
>''[Memo]''~
''⇒''In this example, the account yoshi is also added to ...
Users with a wheel subscription can temporarily become ro...
A general user account called yoshi is now created.
***Give administrator privileges to a general user [#y2b9...
As explained in the previous section, to perform system a...
On OpenBSD, general users can execute commands with root ...
To use doas, you first need to edit the configuration fil...
doas.conf does not exist at first, so execute the followi...
# echo permit persist :wheel > /etc/doas.conf
# chmod 0600 /etc/doas.conf
This will create a file doas.conf with a single line "per...
>''[Memo]''~
''⇒''When you execute doas, you will be prompted for the ...
#aname(usbfadm_expand)
***Extend the storage area of the USB memory [#k9cd1e38]
As explained in [[Creating a FuguIta LiveUSB>fge1:create_...
However, this LiveUSB version of FuguIta can only use 2GB...
Of this, the FuguIta system occupies about 1GB, so usbfad...
The usbfadm utility that comes with FuguIta has a feature...
Below is an example of using usbfadm expand.
fugu-demo# usbfadm ← start usbfadm with root privileges
Welcome to usbfadm.
USB flash drive administration tool for FuguIta
Version/Arch: 7.2/amd64 (FuguIta-7.2-amd64-202302081)
Boot mode: manual
Target device: not set
Data saved as: not set
readline capability available
TAB to complete the reserved words
Type ? for help.
? : ? ->target ← Specify the partition to extend with t...
Searching storage device
Please make sure the device inserted.
Then press ENTER ->
sd0i sd0j sd0k sd1a +sd1d vnd5a ← list of detected part...
target device ->sd1d Partitions with a + ...
are data storage par...
sd1d : ? ->info ← check the capacity of the specified p...
Filesystem Size Used Avail Capacity iused ifr...
/dev/sd1d 1.1G 2.5K 1.1G 0% 5 1287065 0%...
scanning...
512B 7.0/amd64/noasks
sd1d : ? ->expand ← call expand function
Select the expansion method for sd1d:
1: growfs - expands the partition while retaining its...
2: newfs - expand and format the partition
3: [exit without expansion]
->2 ← extend partition using "newfs"
There are two ways to extend a partition: "growfs" and "n...
growfs expands the area while retaining the data stored i...
newfs reformats the partition after expanding the space. ~
Please note that newfs will erase all saved files and dir...
it is recommended that you back up your data before runni...
This makes sd1d as large as possible.
Note that all contents in sd1d will be removed
Do you proceed? [y/N] -> y
/dev/rsd1d: 3136.5MB in 6423488 sectors of 512 bytes
257 cylinder groups of 12.24MB, 3134 blocks, 6272 inodes...
super-block backups (for fsck -b #) at:
144, 25216, 50288, 75360, 100432, 125504, 150576, 17564...
:
6368432, 6393504, 6418576,
** /dev/rsd1d
** File system is already clean
** Last Mounted on
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
1 files, 1 used, 5611214 free (14 frags, 701400 blocks, ...
sd1d : ? ->info ← check capacity after expansion
Filesystem Size Used Avail Capacity iused ifr...
/dev/sd1d 2.7G 2.5K 2.7G 0% 5 1611897 0%...
scanning...
512B 7.0/amd64/noasks
sd1d : ? ->quit
Bye bye...
fugu-demo#
>''[Memo]'' ~
''⇒''File system parameters (format type, block size, fra...
***logout [#m60f45ba]
Enter the exit command to terminate (logout) the account ...
fugu-demo# exit
OpenBSD/amd64 (fugu-demo.localnet) (tty00)
login:
**login as a general user [#p70c5caa]
We created a general user account in the previous section...
OpenBSD/amd64 (fugu-demo.localnet) (tty00)
login: yoshi
Password:
OpenBSD 7.2-stable (RDROOT.MP) #30: Wed Feb 8 13:07:26 ...
Welcome to FuguIta, the OpenBSD-based live system.
FuguIta aims to help popularize OpenBSD operating system...
to get started with.
For information on FuguIta's specific features and how t...
refer to the documentation on https://fuguita.org/.
If you have any questions or suggestions for FuguIta, pl...
me or post a message to fuguita.org's message board.
Please feel free to contact me.
Yoshihiro Kawamata
kaw@on.rim.or.jp , https://fuguita.org/
fugu-demo$ pwd
/ram/home/yoshi
fugu-demo$ ls
fugu-demo$ ls -a
. .Xdefaults .cvsrc .mailrc .ssh
.. .cshrc .login .profile
fugu-demo$
>''[Memo]''~
''⇒''When logged in as root, the shell prompt will be "fu...
Follow this notation in the following examples.
#aname(usbfadm_sync)
*** Save file to USB memory [#vbd70334]
FuguIta saves all data such as files created by the user,...
Run the usbfadm command to save the data. Usbfadm require...
fugu-demo$ doas usbfadm
doas (yoshi@fugu-demo.localnet) password:
Welcome to usbfadm.
USB flash drive administration tool for FuguIta
Version/Arch: 7.2/amd64 (FuguIta-7.2-amd64-202302081)
Boot mode: manual
Target device: /dev/sd0d
Data saved as: fugu-demo
readline capability available
TAB to complete the reserved words
Type ? for help.
? : ? ->
First, specify the destination partition using the target...
After confirming that the storage device is installed, pr...
Devices with a + sign in front of the device name are dev...
? : ? --> target
Searching USB flash drives
Please make sure the device inserted.
Then press ENTER ->
cd0a sd0a +sd0d
targe device--> sd0d
Then name the data you want to save using the saveas comm...
If the name is omitted, the host name will be used as the...
sd0d : ? --> saveas
Name of saved data --> fugu-demo
Your data will be saved as ``fugu-demo''.
Notice that the prompt string, which was originally "? : ...
The values ?k?kset by the target command and saveas just ...
Finally run the sync command to actually save the data.
/dev/sd0d : fugu-demo -> sync
Sync current mfs as fugu-demo, OK? -> y
building file list ... done
created directory /mnt/livecd-config/fugu-demo
./
etc/
etc/bgpd.conf
etc/boot.conf
:
:
var/yp/Makefile.yp
var/yp/Makefile.yp.dist
var/yp/README
sent 16455591 bytes received 232568 bytes 180412.53 by...
total size is 15492096 speedup is 0.93
Let's display the information of the data saved with the ...
/dev/sd0d : fugu-demo -> info
Filesystem Size Used Avail Capacity Mounted on
/dev/sd0d 218M 18.9M 179M 9.6% /mnt
scanning...
18.9M 6.0/amd64/fugu-demo
The data seems to be saved without problems, so exit usbf...
/dev/sd0d : fugu-demo -> bye
fugu-demo$
>''[Memo]''~
Saving with usbfadm can also be done from the shell comma...
fugu-demo$ doas usbfadm -r
doas (yoshi@fugu-demo.localnet) password:
========================================
= Sync current mfs as fugu-demo into /dev/sd0d
=
sending incremental file list
deleting etc/X11/xenodm/authdir/authfiles/A:0-G4H73h
:
var/spool/smtpd/purge/
var/spool/smtpd/temporary/
#
Option -r tells usbfadm to re-save the file. ~
~
You can also use cron to run periodically in the backgrou...
# crontab -l
#minute hour mday month wday command
--- omit ---
#save session periodically
0 */4 * * * PATH=$PATH:/usr/...
This causes usbfadm saves to happen in the background eve...
>''[Memo]''~
''⇒''You can use any partition that is formatted in the O...
***Exit Fuguita [#o83b9962]
To terminate FuguIta operation, log in as root and execut...
Or as a normal user, execute the shutdown command using t...
fugu-demo$ doas shutdown -h -p now
doas (yoshi@fugu-demo.localnet) password:
Shutdown NOW!
shutdown: [pid 4771]
fugu-demo$
*** FINAL System shutdown message from root@fugu-demo.lo...
System going down IMMEDIATELY
System shutdown time has arrived
fugu-demo$ syncing disks... done
In the above example, the -h option is specified as a spe...
In addition, since the -p option is specified at the same...
If you specify the -r option instead of the -h or -p opti...
In Fuguita, user-created data and system configuration fi...
The fact that the operations performed on Fuguita disappe...
In other words, deleting files, stopping processes, etc. ...
#aname(boot_mode3)
*** Read saved settings and files [#cee39c36]
The data saved by the method described in [[Save settings...
To restore the data, select mode 3 in the boot mode selec...
Boot modes:
0: fresh boot - standard mode as a live system
1: fresh boot - less memory, faster boot (/usr is non-...
2: fresh boot - works using only RAM (about 1GB or mor...
3: boot with retrieving saved files from storage device
or enter passphrase for an encrypted volume
4: boot with retrieving saved files from floppy disk
5: interactive shell for debugging
->3
scanning partitions: sd0a sd0d sd0i cd0a
Device(s) found:
loadable from: sd0d
Which is FuguIta's storage device? [default: sd0d] -> sd0d
/dev/sd0d : available data;
fugu-demo
config name -> fugu-demo
Copying files from flash to ram ...
If you specify the saved data name, the saved data will b...
Since all setting values ?k?kare restored, network settin...
at the beginning.
After logging in, you can also save more data. The proced...
And since the save device name and save name have already...
When shutting down, data is not saved automatically by de...
If you want to automate this, please set [[Save data auto...
*** Try starting the X Window System. [#vebc1691]
OpenBSD ships with a graphics environment called the X Wi...
>''[Memo]''~
''⇒''The X Window System may be abbreviated as ''X'' or '...
To use X, select X Window System as the login method as d...
Do you login with Console or X Window System?
[default: Console] -> x
When X starts up, the following login screen will be disp...
#ref(河豚板ガイド/xenodm-login.png,null,50%)
If the login is successful, the following screen will app...
#ref(河豚板ガイド/startx.png)
The white window on the upper left of the screen is calle...
A clock is displayed in the upper right corner. ~
The one on the bottom left is called "xconsole" and is a ...
Something like the table on the bottom right is called "v...
x 3 rows = 9 desktop screens.
The menu appears when you press the left mouse button on ...
X). From this menu you can select X apps to run. Those no...
The following screen is an example of actually running th...
#ref(河豚板ガイド/various-xclt.png,wrap)
In the root window, another menu is displayed by pressing...
>''[Memo]''~
''⇒''X operation is designed assuming operation with a 3-...
middle button, press both left and right buttons at the s...
To exit X, select "Exit" from the left mouse button menu,...
#ref(河豚板ガイド/quit-verify-win.png,wrap)
>''[Memo]''~
''⇒''OpenBSD has several types of software (desktop envir...
* Learning how to use Unix and OpenBSD [#naba8bbc]
#aname(useunix)
** Check how to use Unix-like OS [#h19a6ead]
As explained at the beginning of this guide, FuguIta is b...
Unix was developed in 1969, about half a century ago, and...
Unix-based operating systems are very different from oper...
Fundamentals of Unix-like OS are not made for consumer us...
What approach should be taken to understand and utilize s...
***Book preparation [#u17669c8]
Prepare a book that explains the basics of Unix-like oper...
There are various implementations of Unix-based OS, but t...
The content of the book should not be limited to specific...
It's hard to find a book that says "Read this one and you...
-はじめてUNIXで仕事をする人が読む本 / 木本雅彦 他 著 / ...
-新 The Unix Super Text [上] / 山口和紀・古瀬一隆 著 /...
Reading the following as supplementary readings may help ...
-Unixという考え方-その設計思想と哲学 / Mike Gancarz著 ...
-Linuxを「読む」 / こじまみつひろ著 / 毎日コミュニケー...
#aname(man)
*** Use the online manual [#k6e2dbd8]
After all, moving your hands by yourself is the basis for...
At that time, don't try blindly, but use the online manua...
>''[Memo]''~
''⇒''Unix online manuals are divided into several chapter...
Items with the same name may appear in multiple chapters.~
For example, "sleep" is found in both chapter 1 (general ...
$ man 1 sleep
If you are programming in C and want to know how to use t...
$ man 3 sleep
displays the description of the sleep function in Chapter...
~
Therefore, the notation such as "ls (1)" will appear afte...
>''[Memo]''~
''⇒''Online manuals are sometimes called manual pages. Th...
Apart from online manuals, many Unix commands have the ab...
$ man
usage: man [-acfhklw] [-C file] [-I os=name] [-K encodin...
[-O option=value] [-S subsection] [-s section...
[section] name ...
$ cp -?
cp: unknown option -- ?
usage: cp [-fip] [-R [-H | -L | -P]] source target
cp [-fip] [-R [-H | -L | -P]] source ... directory
The above example displays help messages for the man and ...
Since command help messages are so brief, they are often ...
*** Utilizing the net as "reference information" [#vbed8e...
Using the Internet, you can easily obtain information rel...
But it also has its weaknesses, as explained in the previ...
In addition, many Unix-like OSes now have "official sites...
***Summary [#x9df3154]
Applying the above to the topic "File Attributes", for ex...
-Grab the basics with books ~
→ Find out what the file owner/group/permissions are and ...
-Actual operation while checking online manual etc. ~
→ Actually execute chown, chgrp, chmod commands and check...
- Get related and reference information on the internet~
→Check out things to watch out for, things that are easy ...
→ Check related information on the official website ... I...
FuguIta is also suitable for learning Unix OS as mentione...
#aname(useopenbsd)
** Find out how to use OpenBSD [#hd212d2a]
In the previous section [[Find out how to use Unix>#useun...
***introduction [#f51dcbf5]
After logging in as root, you will receive an email from ...
# mail
Mail version 8.1.2 01/15/2001. Type ? for help.
"/var/mail/root": 1 message 1 new
>N 1 deraadt@do-not-re Sun Oct 18 07:58 86/4565 Wel...
& more 1
Message 1:
From deraadt@do-not-reply.openbsd.org Sun Oct 18 07:58:5...
Date: Oct 18 07:58:58 MST 2015
From: deraadt@do-not-reply.openbsd.org (Theo de Raadt)
To: root
Subject: Welcome to OpenBSD 5.8!
This message attempts to describe the most basic initial...
system administrator of an OpenBSD box might have. You ...
this message for later reference.
....continued....
This email addresses some of the first questions an OpenB...
There is some overlap with the content of this email belo...
*** documents in the system [#rd484046]
As mentioned in [[How to use Unix>#useunix]], online manu...
It is also emphasized in the mail addressed to root immed...
Again, PLEASE READ THE MANUAL PAGES. Our developers hav...
hours improving them so that they are clear and precise.
The man page also has some entries specifically for intro...
purposes.
:[[help>man:help.1]]|This entry is for Unix beginners. Th...
:[[man>man:man.1]]|Description of the man command. OpenBS...
:[[afterboot>man:afterboot.8]]|Explains items that should...
:intro|The manual page is divided into chapters by catego...
man 1 intro
means that the description of the general command categor...
man 5 intro
displays a general description of the file format category.
On OpenBSD, the man page chapters are
organized like this;
|1|General Commands|
|2|System calls and error numbers|
|3|Libraries|
|4|Device Drivers|
|5|File Formats|
|6|Games|
|7|Others|
|8|System maintenance commands|
|9|Kernel|
The content of each section of the manual continues to fo...
Also, in other Unix-based OS, chapter 4 (device driver) a...
>''[Memo]''~
''⇒''The online manual built into OpenBSD can be read wit...
In the FuguIta guide, you can refer to the online manual ...
#ref(河豚板ガイド/emacsinfo.png,around,right)
For commands originating from the GNU project and applica...
To view the Info document, run the [[info>man:info.1]] co...
>''[Memo]''~
''⇒''If you have additionally installed an Emacs editor, ...
#clear
There are application-specific documentation besides man ...
Info.
They are mainly located under the following directories:
-/usr/share/doc
-/usr/X11R6/share/doc
-/usr/local/share/doc
-/usr/local/share/gtk-doc
*** File on system [#a20dea4c]
All configuration files for servers and application softw...
///Software added by the package management tool ports/pa...
System operation logs are located under /var/log. Only cr...
Kernel messages displayed at boot time, as described in [...
in a file called /var/run/dmesg.boot. By viewing the cont...
*** Information on the Internet [#h9ec9da1]
:http://www.openbsd.org/|Official site run by the project...
:http://undeadly.org/|``OpenBSD Journal'' OpenBSD related...
:mailing list|[[officially managed mailing list>http://ww...
archive site for these, and you can view them on the web ...
*** Books [#y291b608]
As far as the author knows, no Japanese books written for...
2023. ~
Some books for BSD Unix,
-BSD HACKS ~
100 Techniques & Tools Used by Professionals / Written by...
Some books, such as, partially mention OpenBSD.
For English books, please refer to [[description on offic...
It seems that some books for OpenBSD have been published,...
#navi(FuguItaGuide)
Page: