Contents
Adding General Users
Root is a privileged user and should not normally be logged in as root.
You must create your own account separate from root. Create a login user with the following command
1 2 3 4 5 |
# useradd huong # passwd huong New password: Retype new password: passwd: password updated successfully |
Create user's home directory
1 2 |
# mkdir -pv /home/huong # chown -R huong:huong /home/huong |
Setting up the use of the sudo command
To grant sudo privileges to the created general user, use the command "visudo" as root and edit the file "sudoers".
This time, "users belonging to the wheel group can use it; they will not be asked for their password when sudoing." Use the
1 2 3 4 5 6 7 8 9 10 11 12 13 |
# visudo Uncomment line 82 ## Uncomment to allow members of group wheel to execute any command %wheel ALL=(ALL) ALL ←It can be used by users who belong to the wheel group. You will be asked for your own login password. Uncomment line 85 ## Same thing without a password %wheel ALL=(ALL) NOPASSWD: ALL ←It can be used by users who belong to the wheel group. No password required。 Uncomment line 88 ## Uncomment to allow members of group sudo to execute any command %sudo ALL=(ALL) ALL ←Any user with a registered account can use sudo. |
Specify commands that can be used with sudo.
1 2 3 |
Uncomment line 60. ## Uncomment to use a hard-coded PATH instead of the user's to find commands Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ←Uncomment and Activate |
Registration to wheel group
Register the created user huong to the wheel group
Display the group to which the current huong belongs
1 2 |
# groups huong huong : huong |
It still belongs only to the huong group.
We will add it to the wheel group so that sudo can be used.
Enter it in the format usermod -G {group to belong to} {username}.
1 |
# usermod -aG wheel huong |
Check your group affiliation
1 2 |
# groups huong huong : huong wheel |
Japanese localization
If you are using the system in a Japanese environment (not used this time)
Do it with "root" user authority
1 2 3 4 5 6 |
# vi /etc/profile.d/lang.sh Lin 14 : Comment out and add below # UTF-8 locales will include "UTF-8" in the output. # export LANG=en_US.UTF-8 export LANG=ja_JP.UTF-8 |
Reboot
1 |
# reboot |
Synchronize time
Edit ntp.conf to configure ntpd
1 2 3 4 5 6 7 8 9 10 11 |
# vi /etc/ntp.conf Add around line 24 # NTP server (list one or more) to synchronize with: #server 0.pool.ntp.org iburst #server 1.pool.ntp.org iburst #server 2.pool.ntp.org iburst #server 3.pool.ntp.org iburst server time.cloudflare.com iburst server ntp.nict.jp iburst server ntp.jst.mfeed.ad.jp |
Start /etc/rc.d/rc.ntpd with execute permission.
1 2 3 |
# chmod +x /etc/rc.d/rc.ntpd # /etc/rc.d/rc.ntpd start Starting NTP daemon: /usr/sbin/ntpd -g -u ntp:ntp |
Check the time
1 2 |
# date Sat Mar 9 11:09:58 JST 2024 |
Package Management
Slackware uses the package management program "slackpkg".
1.Check repository settings
1 2 3 4 5 6 7 8 9 |
# slackpkg info slackpkg This appears to be the first time you have run slackpkg. Before you install|upgrade|reinstall anything, you need to uncomment ONE mirror in /etc/slackpkg/mirrors and run: # slackpkg update You can see more information about slackpkg functions in slackpkg manpage. |
Repository is not configured and needs to be configured and updated
Repository Settings
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 32 33 34 35 |
# vi /etc/slackpkg/mirrors Uncomment one of the mirror sites on lines 125-128 # mirrors - List of Slackware Linux mirrors. # # SlackPkg - An Automated packaging tool for Slackware Linux # Copyright (C) 2003-2011 Roberto F. Batista, Evaldo Gardenali # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Project Page: https://slackpkg.org/ # Roberto F. Batista (aka PiterPunk) piterpunk@slackware.com # Evaldo Gardenali (aka UdontKnow) evaldogardenali@fasternet.com.br # # END OF LEGAL NOTICE ----omission---- # JAPAN (JP) # ftp://ftp.nara.wide.ad.jp/pub/Linux/slackware/slackware64-current/ # http://ftp.nara.wide.ad.jp/pub/Linux/slackware/slackware64-current/ # ftp://riksun.riken.go.jp/Linux/slackware/slackware64-current/ # http://riksun.riken.go.jp/Linux/slackware/slackware64-current/ |
Or describe the following mirror sites
For 64bit https://mirror.slackware.jp/slackware/slackware64-15.0
For 32bit https://mirror.slackware.jp/slackware/slackware-15.0
Update Package List
1 2 |
# slackpkg update # slackpkg upgrade-all |
2.Installing a new package
If there are new additional packages, they will appear as follows
We will install all of them, so continue to ENTER
3.When the configuration file is updated
Sometimes a package update also updates the configuration file.
In such cases, the following message will appear at the end of the message.
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 |
Searching for NEW configuration files... Some packages had new configuration files installed (13 new files): /etc/bluetooth/main.conf.new /etc/cron.daily/certwatch.new /etc/cups/cupsd.conf.new /etc/cups/cups-files.conf.new /etc/dnsmasq.conf.new /etc/irssi.conf.new /etc/logrotate.d/mysql.new /etc/networks.new /etc/ntp.conf.new /etc/rc.d/rc.inet1.new /etc/ssh/sshd_config.new /etc/sysstat/sysstat.new /usr/share/vim/vimrc.new Press any key to continue What do you want (K/O/R/P)? (K)eep the old files and consider .new files later (O)verwrite all old files with the new ones. The old files will be stored with the suffix .orig (R)emove all .new files (P)rompt K, O, R selection for every single file o ←Enter "o". |
If there is a kernel upgrade, be sure to press the ENTER key when the following is displayed
1 2 3 4 |
Your kernel image was updated, and lilo does not appear to be used on your system. You may need to adjust your boot manager (like GRUB) to boot the appropriate kernel (after generating an initrd if required). Press the "Enter" key to continue... |
Return to command entry and be sure to take the following actions
1 |
# cp /boot/vmlinuz /boot/efi/EFI/Slackware/vmlinuz |
4.Removing Excluded Packages
Remove the package so that it does not remain in the trash.
1 |
# slackpkg clean-system |
Vim Preferences
Create the following two files
1 2 |
# touch /etc/skel/.bash_profile # touch /etc/skel/.bashrc |
The "/etc/skel/.bash_profile" is described as follows
1 2 |
#!/usr/bin/bash source ~/.bashrc |
The "/etc/skel/.bashrc" is written as follows
1 2 3 4 5 6 7 8 9 10 11 |
PATH="$PATH":/sbin bind '"\e[A": history-search-backward' bind '"\e[B": history-search-forward' alias ci='ci -l' alias ls='ls -a --color' alias vi=vim alias view='vim -R' |
If "/sbin" is not in the path, do the following
1 2 |
# cp /etc/skel/.bash_profile ~/. # cp /etc/skel/.bashrc ~/. |
Create ".vimrc"
1 2 3 4 5 6 7 8 9 |
# vi /etc/skel/.vimrc set number set mouse-=a augroup vimrcEx au BufRead * if line("'\"") > 0 && line("'\"") <= line("$") | \ exe "normal g`\"" | endif augroup END |
Perform the following
1 |
# cp /etc/skel/.vimrc ~/. |