0% found this document useful (0 votes)
101 views18 pages

LPIC1 Commandes

The document discusses various topics related to managing devices, partitions, boot process, kernel modules, and file systems in Linux. It covers commands to view hardware components and removable devices, manage boot targets and runlevels, install software packages, manipulate text and files, archive and backup files. The key points are: - Linux uses /dev/ to represent devices, lsmod to view modules, and modprobe to load modules. It can view devices using lsusb, lspci and dmesg. - The boot process involves BIOS, MBR, bootloader (GRUB), kernel and initrd to load the OS. Systemd and upstart are used for process initialization in different distributions. -
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
101 views18 pages

LPIC1 Commandes

The document discusses various topics related to managing devices, partitions, boot process, kernel modules, and file systems in Linux. It covers commands to view hardware components and removable devices, manage boot targets and runlevels, install software packages, manipulate text and files, archive and backup files. The key points are: - Linux uses /dev/ to represent devices, lsmod to view modules, and modprobe to load modules. It can view devices using lsusb, lspci and dmesg. - The boot process involves BIOS, MBR, bootloader (GRUB), kernel and initrd to load the OS. Systemd and upstart are used for process initialization in different distributions. -
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 18

Integrated Hardware Devices

/dev/-----: The folder containing files that are the pointers to devices.
lsmod: shows the active modules installed on the system
modprobe: instert a module into the system.

Removable Devices in Linux:


lsusb(ubuntu): shows usb devices that are connected in the system.
usb-devices(ubuntu): gives a long look information of the device.
lspci:(ubuntu) shows pci devices.
dmesg: shows kerenl message and system events.

Dealing with devices:


/proc/: process information are put in this folder.\generated by procfs
/sys/: information about system configuraton.(kernel 2.5) genertared by sysfs
/dev/: pointers to the differnet devices (kernel 2.6) generated by dbus

Linux Boot Process:


BIOS/UEFI --> Activate onboard hardware and turn things to the boot device.
MBR/ Master Boot Record--> contains the bootloader and partition info.
GRUB /Bootloader-->lanches kernel and intird.
initrd (intial ram disk)--> minimal linux kernel that detects what kernel modules to load.
kernel -->load the programs using the init process.

Boot Time Kernel and Init Systems:


single mode is used to change the root password
you shoud modify the kernel arguments by addin "single" at the end
sysVintit: the way we start processes in most common linux distrib
upstart: used method for intiating processes on ubuntu distribution.
Systemd: used with start dependency conditions. cd /etc
systemctl: controls the start of daemons and processes.
* enable:
* start:

Managing Runlevels with SysyVinit:


runlevel: define the enabled features of the system.
0: Halt
1: Single user mode
2: Multi user, no net
3: Multi user, with net
4: Not used
5: Multi user GUI
6: Reboot
telinit r: command to switch to a run level (r)
init r: the same as the telinit.
runlevel: to show the actual running level.
/etc/initab: file where to define the default running level. (id:r:initdefault:)

Managing Boot Targets with SystemD:


boottarget: equivalent ons systemV to runlevels.
poweroff
rescue
multi-user
graphical
reboot.
systemctl: used to switch between boot target
isolate: to set a target
get-default: to get the default set target
set-default: to set a the default target.
/etc/systemd/system/ : where resides the information about the targets.
/usr/lib/systemd/system/: same as the previous

Proper Halting and Rebooting the system:


telinit 0: equivalent to poweroff target.
teliniit 6: equivalent to reboot target on systemD.
powerof: sends ACPI power off signal
halt: somyimes doesn't power off.
reboot: as it saids.
-f : kill the process with forced manner before rebooting.
wall: send a message to all terminals.
echo "Message" | wall
shutdown: to shutdown the system with options
-r : reboot now
-h +t:in t minutes.
-P T: specifie the time T
-P +t "Messages"

Partitions and Mount Points:


Partitions: define portions of storage drive, virtually mentionned on the MBR.
/boot: a folder that must be readable by bootloader from the GRUB.
0 we should separate noramally active folders (/var for exepmle) from other less active
but critical partitions.

RAID vs LVM:
RAID:Redundant Array of Independents Disks.
LVM: Logical Volume Manager. It can combines Drives to appear as one logical space agregating
volume.

Boot Loader GRUB vs GRUB 2:


GRUB: Grand Unified Boot system. The first sector of the hard drive where specified the
indications of boot process:
--> Stage 1: MBR
-->Stage 2: /boot
/boot/grub/menu.lst : file containing the configuration for the GRUB 1 (legacy)
/etc/grub2/grub.cfg: file containing the configuration for the GRUB 2
/etc/default/grub: place wher to make grub configuration modification
/etc/grub.d/--- : Same as the other one
grub2-install: command to take grub configuration effects.
grub-mkconfig -o "grubfile": command to configure grub parameters.

Managing Shared Libraries:


shared libraries : the libraries that are used # programs at the same time.
/etc/ld.so.conf: tells the system where to look for library files.
/etc/ld.so.conf.d: it is actually pointed from the previous file. It contains the libraries for each
program.
/etc/ld.so.cache: cache file (binary) created by ldconfig rapid pointer to file libraries .
ldconfig: comand to create ld.so.cache file.
ldd: shows the libraries toused by the followinf command
to add a path to a library temporarlly:
export LD_LIBRARY_PATH="/Folder-Path:$LD_LIBRARY_PATH"

Using APT:
APT: Manager used to install software for debian distributions (Ubuntu)
/etc/apt/sources.list: contain the information about the repositeries to be used
/etc/apt/sources.list.d/: contain the repositeries listed i separated files.
apt-get : commande to interact with packages
update : update the cache of the information repository
upgrade: upgrade ths system except the kernel
dist-upgrade: upgrate everything including the kernel
install :install a specific package
remove: remove a specific package
purge: remove a package and its configuration file
apt-cache: gives information about packages
search :information for a specific term
show: details on specific package
aptitude: alternative command use for apt management
search
show
install
safe-upgrade
dpkg-reconfigure : to recunfigure installed packages on the system.

Using YUM with RPM's:


YUM: Yellodog Updater Modified, manager used to insall rpm packages.
RPM: Redhat Packet Manager.... files/ packeges for software installation.
yum: command used to interact with the yum manager:
search: looking for info about a specified package.
info : gives information about the specified package
install: to install the package.
remove to rmove the package.
provides: shows the packages that provided the specifies file.
updates:update installed package. if not specified, it will updated al the installed
packages
/etc/yum.conf: configuration paramters for yum resides in this packages.
/etc/yum.repos.d/: directory where we specify the repository on which we download the
packages.
rpm2cpio and yum downloader:
cpio: concatenate differnet files of a software package into one.cpio file (first step of rpm
creation)
-idvf > file.cpio: recover the original package structure into the different files (reverse)
rpm: agregate cpio file with its belonging description and dependencies to create rpm file.
rpm2cpio: extract the cpio file from the rpm file.
This is used to recover files deleted unintentiolly from our system.

Commad Line Intro:


cmd1 ; cmd2 : the ";" used to execute the cmd and cmd 2 recurssively with the outputs in #
lines.
cmd1 && cmd2 : the output is the same as ";" but the second command isn't executed if the
first didn't success.
TAB (touch): autocompletion feature on bash
history: shows you the history of commands executed.
-c : to clear the history of the comand line.
.bash_history: file where hitory is stored, it is specified in the perosonal folder of the connected
user

Working with Environment Variables:


env variable: define parameters that are set when loged into the system
env: shows all the system defined variables.
PATH: variable that mention all the folders where we look for commands to execute.
export: set a value to the specified path
export PATH=/folde:$PATH
unset: to remove the variable with its value from the current process execution.

Manipulate Text:
head: show the first few lines of a text file.(normally the first 10 lines)
-n: for specifying the number of lines.
tail: show the last few lines of a text file. Often used for viewing log files.(normally the last 10
lines)
-n :for specifying the number of lines.
cat: concatenate and display different files. Often used to display files.
split: divide one text file into multiple files
-l : spcify the number of lines into each new created file.
paste: merge data from different files side by side horizontally
join: merge data from different files combing a specific parameters (number for example)
(communality should be find between lines so that it will apear)
expand : converts "tab" into spaces.
unexpand -a :convert spaces into the "tab"
sed: stream editor, used to substitute, nest and simple regex
1 sed 's/this/that/g' file.txt'
s--> for substitute
this--> the text to replace
that--> the text to be replaced with
g--> global , to keep searching through each line.

File Management:
pwd: presents actual working directory
"." : shortcut signifing the current directory.
".." : shortcut for the folder above.
~ : shortcut to the home directory of the connected user.
ls : listing the contents of a folder
-R : shows recursively the content of each sub-folder.
-l : show long listing
-a : showing even hidden files or folders
.file: makes the file hidden by adding the "." at the start.
touch: creates empty file, or update time stamp.
rm : remove files (or folders for a recursive use)
-rf: recursive and force the hidde file.
mv: moves files or folders, used to rename .
cp : copy files ( or folders for a recursive use)
-R :to copy a folder withs whole contents.
mkdir: make folder.
rmdir: removes folders that are already empty

Find Command:
find :look for a file or a directory on the system :
find <location> options... -exec commands
- type d/f (directory or file)
- name (file name)
- iname (case insensitive name)
- mtime (modified in last x days)
- mtime +/- (more than /less than days)
-cmin -60 ( changed in lat 60 minutes)
- size +S : for size criteria

Using TAR, CPIO and dd:


dd: this command is used to interact with block devices instead of filesystem. It is used
normally to copy complete block file from one device to another on:
dd if=/dev/fd0 of=/dev/sdb [bs=4k]
if= for input file
of= for output file
bs= block size.
tar :tape archive, used to create archive and extract file from archives:
-cvf: to creat archive : tar -cvf output.tar what-to-includ
-xvf: to extract files from an archive.
cpio: concatenate differnet files of a software package into one.cpio file
idvf <file.cpio: recover the original package structure into the different files
-ov: > file.cpio: to create the cpio file.

Compressing Files with Gzip Bzips


gzip: compress files with normanl compression ratio .
gunzip: uncompress gzip compressed files.
bzip2: compress compress files with higher compression ratio .
bzip2: uncompress bzipz compressed files.
zip: do archiving and compression at the same time.
-r: should be used when zipping folders with its entire files.
unzip: uncompress and unarchive files ziped
Standard Input/Output/Error:
Each application on the system running can have the three different entries
STDIN: Normally is the keyboard input by default
STDOUT: signify the expected result that is shown on the Console
STDERR: the errors generated that are shown on the console
redirection to or from files can be done by those Methods:
< : redirect STDIN
>: redirect STD
2> :redirect STDERR
read : invoke to input a string using the keyboard
read VAR : what is typed by keyboar will be the value of the VAR variable.

Pipes, Data Redirection and Xargs:


Pipe "|": dump the STDOUT of an APP in the STDIN o the next app.
Xargs: a program that listen on STDIN and paste it on the end of the next command
STDIN --> xargs command STDIN
Tee: to redirect to STDIN and to the screen a the same time
cmd | tee file.txt
We can mention STDOUT in our commnd with &1
cmd > file.txt 2>&1 : here the STDOUT is the file.txt.

Fourgreound and Background Jobs.


& : this is used to launch a job in the background gf fg
cmd arg1 arg2 ... &
Ctrl+z: to suspend a commnd
bg : to put a job to run in the background .
bg %[jobnumber] :jobswithout arguments return the most recent one .
jobs : shows the running jobs with the launching command
fg : return to a specified job.
fg %[jobnumber] : without arguments return the most recent one .
NB :All the launched jobs are kolsed after the terminal session si closed.
nohup : launch the command and protect the process from stopping after terminal closing
nohup cmd arg1 arg2 .... &
disown : protect backrond launched job
disown %[jobnumber]
screen: create a kind of new virtual terminal we can go back to if we want to intract with a
backgroud job.
ctrl+a+d : disocnnect from the screen and keep the jobs running in the backround
-dr : option to bring up the the command we want to interact with.
exit :to exit from the screen and return to normal erminal window.

PID, Signals and the kill command:


PID : process identifiers
Signals: the way we communicate with the processes on the machine.
SIGHUP : 1 : Hangup: notifying the child porcesses that they should stop.
SIGINT : 2 : Interrupt: it's the eaquivqlent to Ctrl+C
SIGKILL: 9 : kill : To force the dying of the process.
SIGTERM : 15 :Terminate : close propoerely a process
Those signals are used to tel a process to finish
kill: the command used to send the signals to processes.
without argument : it sends the SITERN 15 to the process
- 9 : to kill the process
Advanced Process Management:
killall: kill all the procceses running the command given as argument
kill cmd.
pkill: can do the same us killall, but we know only a part of the command.
-f : the same as in the pgrep
pgrep: returns informations about the processes containg a word given as an argument.
-a : a flag to show all information about the processes.
-f: a flag to search for the word on the full command line (we combine -af)

Process Priorities:
Nice-level/ Priority level : define the much of the time cpu to use by a process. The Nice level is
defined as following:
-20 : The highest Priority level
0: the Default level
19: The lowest priority level
nice : specify the priority level to launch an application :
nice -l application: l defines the level (from -20 to 19)
ps -alf : to show processes with priorities
renice : this command change the priority o already running process
renice l -p PID

Grep, fgrep & egrep:


grep: searches for tex , return line if found.
^: begining of the line
$: end of line
.: any character
|: or
[ ]: ranges
egrep: extended grep, used normally when using ranges or |, for different hypthesis as a search
criterias
ps : must be used with single cotes
fgrep: fast grep, it doesn't take in consideration regular expressions

The VIM usage:


vi : The editor that has two modes:
Command mode : save, quit, search, replace, navigate aroud, execute macros, initial mode.(ESC
for returning to the mode)
Insert/Append/Open mode: enter from command mode, interactively edit text, navigate with
aroww keys.
H-J-K-L: Used as arrow keys.(Kiets go up)
:w--> write the current file
:w filename--> write to new file
:q--> quit
:q!--> quit even if not saved.
/term: search forward through the document.
?term: search backward through the document.
:%|s/term/replacement/gic: to search for a term and substitute it with another one.
%: search on the hole document.(optional)
s : for substitution.
term: what you want to replace
replacement: what you want to replace with
g: to replace all the terms even at the same line.
i: case insensitive
c: confirm each replacement
dl-->delete character
d5l--> delete 5 characters
dw:-->delet a word
d3w--> delete 3 words
dd--> delete line
d4d --> delete 4 lines
yy--> yank (copy) current line
y5y--> yank 5 lines
y3w--> yank 3 words
p--> paste yanked text after current line.

GPT vs MBR:
MBR(Master boot record): a part o the hard drive that describe its content (partitions
informations). It resides on the first sector of the drive.(2TB max of HD and 4 partitions)
GPT (GUID (Global unique identifier) Partition Table): Same as MBR but stored in multiple
locations , with unlimited number of parttions per hard drive
PS: Each parttion is named in system as sda

fdisk: a tool used to format Hard drives, and make partitions. with MBR mode
gdisk : a tool used to format Hard drives, and make partitions. with GPT mode

Formatting Partitions in Linux:


ext ( Extended File System) : File system used for formatting partitions in Linux. (Versions are 2,3
and 4)
journaling: keeps records on changes .....(kind of safety system)
swap: it is a non-filesystem, it is a kind of paging file.
mkswap : create swap partitions or file.
mkfs: create filesystem on
-t : specifies the type of the file system.
.ext2/.ext3/.ext3/.msdos/.ntfs: when attached to the command, it specifies the
filesystem type
mke2fs: to create a file system (without options makes ext2)
mke2fs -j : make ext3 filesystem.
parted: commad to manipilate partition on hard drive (parted /dev/sdb)

Maintaining File Systems:


fsck(file system check): detects the fs type and checks its integrity. It
PS: The file system must not be mounted while to be checked.
-N : shows the command it will execute when checking a system
-f: repair the filesystem.
tune2fs: change ext2 to ext3
dumpe2fs: show all superblock info
debugfs: interactive filesystem editor.
xfs_info: shows info
xfs_check: complete check of file system
xfs_repair: checks and fixes problems
-n : similar to xfs_check (recommanded than the check command)

Mounting and Unmounting :


mount: to mount a file system on a directory
-t fstype device location (-t ext4 /dev/sdb2 /home)
-o to specify the read only , read write of the system
without options shows the mount point on the system.
umount: unmount a file system on a directory
/location or /dev/sdbx
/etc/fstab: file containing the mount point that should be made on boot

Drive Quotas :
Setting limitations to users on hard drive space usage. Two types of quotas exist:
Hard : Permissions are limited to hard capacity
Sof: limited with an amount designed as a limit , when the limits exceed, there is a timer that
gives ane time extension until we return bach down the limit.
quota: package that should be intalled using the package manager.
- on the /etc/fstab , we should add usrquotq,grpquota as options.
- we should remount the partition : mount -o remount /dev/sdb2
quotaof: to make sure that the quota are off on the partition
quotacheck : to check and create quotas
-cug /dev/sdb2
edquota: to edit and set quotas for groups and users
-u user /dev/sdb2
repquota: reports existing quotas on a device.

File Ownership and permissions:


chgrp : to change the group to wich belong a file
chgrp grp1 file1
chown: to change the owner of a file.
chown user file1
umask: define the default access permissions parameters.The default parameters resides in teh
following files:
-/etc/profile
- /etc/bashrc
-/etc/login.defs
Special Permissions:
SUID: executes a file ithe permissions of the file owner.
GUID: executes a file with the permissions of the group , and create files on the folder with
group membership
Sticky Bit: only the owner can delete the files.
chmod : to change the permissions into the special ones
chmod u+s --> SUID
chmod g+d-->GUID
chmod o+t--> Sticky Bit

Hard and Sof Links:


inode : the block where every file starts.
Hard link : the same file is linked to 2 different names (Files) on the same hard drive, and
modifications affect both the files, the link is used within the inod.
Symblic link : It is a kind of pointer to the a file name, and can be created in different hard
drives.
ls: to list files :
-li : to show the inod where the file starts.
ln: to create a link to file
ln file1 hardlink
-s : to create a softlink.

File Hierarchy Standard:


/ : the base level of the FS (root)
/bin: contain system binaries
/boot : where the boot loader are stored.
/dev: listing of the devices
/etc: contain the configuration files
/home: contain user files.
/lib : the systeme libraries needed for single user mode.
/proc : virtual filesystem ,
/root : root's home folder.
/sbin : essential system binaries.
/tmp: temporary storage location.
/var: where temporal files (logs, mail.....) stored
/media: this is for removable storage.
/mnt: temporary file system for mount.
/usr : where programs and binaries are stored.
/usr/bin: : binaries for programs .
/usr/lib: whres libraries are stored.
/usr/local: specific things to the system lives
/usr/local/bin: binarie directory for local.

Find and Locate:


which: gives the path for the program we are looking for (used to locate binaries)
whereis: gives the result of which and add the man page location also
find: search in real time to the whole hard drive for what you are looking for.
-name : to look for a file that its name contaning the parameters we look for.
locate : can locate where a file existe.
updatedb: update the indexation of files so that locate command will be updated.
/etc/updatedb.conf : configuration file for updatedb command
User Profiles and system Profiles :
Login shell:this is the shell used when connecting with ssh mode, that load profile settings.
It loads the following files in this order:
/etc/profile --> /etc/profile.d/* -->/home/user/bash-bash_login_profile
Interactive shell: doesn't load profile settings, it is launched in the GUI mode.loads the two files:
/etc.bashcrc -->/home/user/.bashrc

Scripting Basics:
#: used to make a line as a comment that it's not interpreted on the execution exept the first
line.
shebang : the first line that begin with "#!" tha specifies the interpreter for the script. this is
followed by the path to the interpreter (#!/bin/bash
echo: it prints on cmnd line the specified String.
echo " What to print".
Variable: a way to store information during the script execution.
VAR="Value"
$VAR: it returns the value of the variable VAR.
Substitution : replace the value of a variable by the result of a command
MYFILES=$(ls -l)
command: you can just specifie the command to excute on the script and then it returns the
command result during the excutions.
NB: you should change the permissions of the file to be executed. If it cannot be changed, you
can use : bash script1

Scripting: Conditionals and loops:


if/then/else: this is the manner to treat conditions in scripting. (else part is not a mandatory
part)
if [conditional expression]
then
cmd1
cmd2...
else
other cmd3
other cmd4...
fi
conditional expressions:
== : to compare for eguality and matching
-lt: less than
read: it convoques the user to enter a statement on the cmd line.
for loop: can do a sequence of commands of a variable in a sequence of values.
for VAR in some sequence ;
do
stuff
stuff with $VAR
done
Sequence: it specifies a set of value that a variable takes when executing a loop command
val1 val2 val3 ...;
range: particular sequence that startswith a number "a" and finishes with a number
b {a..b}
susbstitution ( sequence replaced with the results of a command)
while loop: this loop can a execute a set of commands while a conditional statement is true.
while [conditional statement]
do
stuff
stuff
done

let: this command is used to change the value of a variable (let VAR=VAR+1)

SQL Data Management:


mysql: command to interract with mysql DBMS already installed on the system.
-u: specifies the user (mysql -u root -p food)
show tables: shows the tables belonging to the database.
select: command that return the content of the table.
*: show all the fields belonging to a table (select * from fruit)
where: specifies a condition. (select * from fruit where color="yellow")
AND: to add a condition on the where statement (select * from fruit where
color="yellow" and size="small")
order by : to specifie the order of the result by a criteria (select * from fruit order by
color)
group by: to specifie the groupping of the returned results.
INSERT: adds a row of data to the table
INSERT INTO fruit (fild1, field2, field3....) VALUES (value1, value2, value3... )
DELETE: to delete a row from a table.
DELETE FROM fruit WHERE name= "pineapple"
UPDATE: to update a row on the table with the a new value of a field.
UPDATE table SET field = "new value" WHERE field 2= "value1"
JOIN: join and displays 2 tables that have a specified fields with commun values.
SELECT * FROM fruit JOIN vegetable ON fruit.color=vegetable.color
quit: to exit from the mysql mode.
X11 (Xorg) Configuration :
xorg.conf: old configuration file for X11 display protocol. On old systems it existed in
/etc/X11
xwininfo : it displays information about a sceen.
xdpyinfo: gives informations to deal with X11 server.
xhost: it speciefies which users (localhost, or remote) can connect to xserver
$DISPLAY: Environment variable that contain the IP @ where to execcute xcommands.
SSH -X: redirect Xdiplay from a remote computer to the current one.

Display Managers:
Diplay Manager: GUI inteface you can login when you are running graphical interface on the
computer.(exemple lighdm, XDM, KDM, GDM)
/etc/lightdm: configuration files for the lightDM.

Accessibility:
Nothing Special to mention.

Managing Users & Groups:


passwd: command ro change the password.
sudo passwd user1 : to change user1 password with the root priviliges.
useradd : this command is used to add a user .
-d: to specifie the home directory
-m: create the home directory.
-s : specifie the shell .
-G: to add additional groups .
-c : to comment (used for specifyeing the name and the purpose of the accound)
usermod: to modify a user account (most of the useradd options)
-L : Lock account
-U: unlock account
-aG: add to group.
userdel : to delet a user on the system
-r : delete the home folder.
id : to get information about a user .
id user1 .
getent passwd: shows the content of the password file.
groupadd: to add a new group of users on the system .
-g: to specifie a specific id for the group.
groupmod: to modify an existant group.
groupdel: to delete a group on the system.
Password Group, and shadow Databases:
/etc/passwd : file where we store information about users included in the system.
user:(old versions passwd encrypted): uid:ugid:comment: home directory: shell
/etc/shadow: the file that contains real encrypted password for each user on the system
chage: shows and change infomation about password user expiration information
-l : to specify the user to list info for.
-E: specify expiration date when changing
/etc/group: contains informations about groups.
/etc/gshadow: the shadow file for a group.

Personal Job scheduling with AT and Cron:


cron: set the scheduling of jobs,applications, etc... using the following scheme.
* : minute
* : hour.
* : day of month
* : month
* : day of week
* : command to execute.
instead of using 5 fields we can have those exceptions:
@reboot: on rebooting the system.
@daily: daily scheduling.
x,y,z: in the field it means th xth , yth and zth min, hour, day or month.
x-z: to specify a range
*/z every z minutes or hours ...
crontab -e: to edit job scheduling on the system.
/var/spool/cron/crontabs : folder containing personal crontabs.
at: one time schedular (cron is for periodic scheduling).
at "moment"
at> cmd1
at>cmd2
ctrl+d.
atq: to show the queue of the scheduled tasks with at tool.
atrm : to remove the scheduled task with at tool.
/etc/cron.allow : where we specify users allowed to cron scheduling.
/etc/cron.deny :where we specify users denied to cron scheduling
/etc/at.allow : where we specify users allowed to at scheduling
/etc/at.deny :where we specify users denied at scheduling

System Job scheduling with cron and Anacron:


/etc/crontab: file containing system-wide crontab.
/etc/cron.d/: the folder wher a program can add system-wide cron files.
/etc/cron.daily/ : folder containing executable files with a daily frequency.
/etc/cron.weekly/ : folder containing executable files with a weekly frequency.
/var/spool/anacron: where timestamps are stored for scheduled jobs. (It notice the run jobs
within the not run - it is checke at the boot time.)

Localization and Internationalization:


tzselect: to identify the time zone of the system.
/usr/share/zoneinfo/: contains all information about time zones that the system needs.
/etc/timezone: where the timezone setting is set
/etc/localtime: it is the binary file from the 2nd folder (/usr/share/zoneinfo/: ) that is copied
to the /etc folder
locale: to show environment variables that tells what system languages are we using.
LC_ALL: the variable tha overwrite everything with the spcified value.
iconv: a command that deal with encoding (converting)
-l : to list encoding possibilities.
iconv -f (Source-Encoding) -t (Destination-Encoding) file_to_convert

Maintaining System Time


Hardware Time: the time on the motherboeard that is kept using battery.
date: command show the set system clock
- s: to set a system time.
hwclock: to show the hardware clock value.
--set: to set a new value.
hwclock --set date="mm/dd/yy h:m:s"
-u : for setting the UTC
-w : to set the value of the hwclck on the system value.
/etc/adjtime: it shows the setting time of the Hwclock
NTP: Network Time Protocol. (www.NTP.ORG)
ntpdate: command that sets the system time on the value of the ntp server given as a
parameter.
ntp service : it is a service that do continually sync the system clock with an ntp server.
service ntp start : to start the ntp server.
/etc/ntp.conf: configuration file for the ntp deamon.
ntpq: the cmnd to deal with ntp
-q: show ntp servers that the client is connected to.

You might also like