• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/149

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

149 Cards in this Set

  • Front
  • Back
/sys
a virtual filesystem that contains information for the system to run, everything in this directory is read only.
/etc
system configuration files. contains configuration files, which can generally be edited by hand in a text editor. Note that the /etc/ directory contains system-wide configuration files – user-specific configuration files are located in each user’s home directory.
/mnt
Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.
/lib
Library files, includes files for all kinds of programs needed by the system and the users. Contains libraries needed by the essential binaries in the /bin and /sbin folder.
/home
Home directories of the common users. This home folder contains the user’s data files and user-specific configuration files. Each user only has write access to their own home folder and must obtain elevated permissions (become the root user) to modify other files on the system.
/lost+found
Each Linux file system has a lost+found directory. If the file system crashes, a file system check will be performed at next boot. Any corrupted files found will be placed in the lost+found directory, so you can attempt to recover as much data as possible.
/boot
The startup files and the kernel. Contains the files needed to boot the system – for example, the GRUB boot loader files and your Linux kernels are stored here
/bin
Common programs (commands) shared by the system, the system administrator and the users.
/sbin
Programs for use by the system and the system administrator. It contains essential binaries that are generally intended to be run by the root user for system administration.
/proc
A virtual file system containing information about system resources. It contains special files that represent system and process information.
/dev
Contains references to all the CPU peripheral hardware, which are represented as files. Linux exposes devices as files, and the /dev directory contains a number of special files that represent devices.
/var
Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.
/root
The administrative user's home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.
/usr
Programs, libraries, documentation etc. for all user-related programs. contains applications and files used by users, as opposed to applications and files used by the system.
/opt
Typically contains extra and third party software. Contains subdirectories for optional software packages.
/tmp
Temporary space for use by the system, cleaned upon reboot, so don't use this for saving any work!
modprobe
adds and removes modules from the Linux kernel.
Modules
Modules are pieces of code which extend the functionality of the operating system kernel without the need to reboot. Once loaded, modules reside in memory, and can be instantiated multiple times; they can be thought of as analogous to a device driver.
lsmod
shows (or "lists") the status of modules in the Linux kernel.
lspci
lists pci devices attached to the system.. Peripheral component interconnect.
lsusb
lists usb devices attached to the system
dmesg
prints the message buffer of the kernel. dmesg obtains its data by reading the kernel ring buffer. A buffer is a portion of a computer's memory that is set aside as a temporary holding place for data that is being sent to or received from an external device, such as a hard disk drive (HDD), printer or keyboard. A ring buffer is a buffer of fixed size for which any new data added to it overwrites the oldest data in it.
BIOS
Basic input output system. The BIOS is a small program that usually resides in a flash memory chip. Flash memory is a type of memory that retains its contents even in the absence of a power supply. The BIOS loads the first MBR that it locates, which is usually the one on the HDD. The BIOS looks for the MBR on the HDD in a standard location, which is the first sector and the first head in the first cylinder(designated as cylinder 0, head 0, sector 1). This is commonly referred to as the boot sector.
Kernel
the core of an operating system. It is the first part of the operating system that is loaded into memory when a computer boots up (i.e., starts up), and it controls virtually everything on a system.
init
the parent of all processes. Its primary role is to create processes from a script stored in the file /etc/inittab. It also controls autonomous processes required by any particular system.
systemd
is an init system used in Linux distributions to bootstrap the user space and manage all processes subsequently,
/etc/inittab
When you boot the system or change run levels with the init or shutdown command, the init daemon starts processes by reading information from the /etc/inittab file. This file defines three important items for the init process:The system's default run level, What processes to start, monitor, and restart if they terminate, What actions to take when the system enters a new run level
shutdown
shutdown command brings the system down in a secure way. All logged-in users are notified that the system is going down, and login operations are blocked. It is possible to shut the system down immediately, or after a specified delay. shutdown does its job by signalling the init process, asking it to change the runlevel.
initrd
The initial RAM disk (initrd) is an initial root file system that is mounted prior to when the real root file system is available. The initrd is bound to the kernel and loaded as part of the kernel boot procedure. The kernel then mounts this initrd as part of the two-stage boot process to load the modules to make the real file systems available and get at the real root file system. The initrd contains a minimal set of directories and executables to achieve this, such as the insmod tool to install kernel modules into the kernel.
/etc/init.d/
The init.d directory contains a number of start/stop scripts for various services on your system. These scripts will either begin with a "K" or an "S". All "K" scripts are run before "S" scripts.
telinit
used to change runlevels
swap space
sed when the amount of physical memory (RAM) is full. If the system needs more memory resources and the RAM is full, inactive pages in memory are moved to the swap space. Linux divides its physical RAM (random access memory) into chucks of memory called pages. Swapping is the process whereby a page of memory is copied to the preconfigured space on the hard disk, called swap space, to free up that page of memory. The combined sizes of the physical memory and the swap space is the amount of virtual memory available.Swapping is necessary for two important reasons. First, when the system requires more memory than is physically available, the kernel swaps out less used pages and gives memory to the current application (process) that needs the memory immediately. Second, a significant number of the pages used by an application during its startup phase may only be used for initialization and then never used again. The system can swap out those pages and free the memory for other applications or even for the disk cache.
mount points
A mount point is a directory (typically an empty one) in the currently accessible filesystem on which an additional filesystem is mounted (i.e., logically attached). In simple words a mount point is a directory to access your data (files and folders) which is stored in your disks.
Formatting
Formatting is a concept on how we write data onto disks. Data can be written in many ways with different metadata added to each chunk of data written to disk for security, reductions in disk space wastage, etc. Once formatting is done on a partition, we can write data on the partition. To access that partition we link the partition to a directory in our machine so that if we go to that directory we can access all the data stored in that partition. This linking of partition with a directory is called as mounting or mount point.
Partitions
A partition is a slice of a hard disk to write data into it. There are many advantages in creating partitions such as protection from data corruptions by isolating each partition from one another, systematic writing data to disks, even sometimes writing and reading is fast when we create partitions.
Grub-install
used to manually install Grub.
Grub-mkconfig
generates a Grub configuration file.
MBR
Master Boot Record. A small program that is executed when a computer is booting (i.e., starting up) in order to find the operating system and load it into memory. During the first stage of the boot process, the BIOS (basic input output system) searches for the MBR and then loads it into memory, after which the MBR takes over.
ldd
(List Dynamic Dependencies) is a utility that prints the shared libraries required by each program or shared library specified on the command line. ldd is a shell script that executes the program given as argument, and shouldn't be used with untrusted binaries. If some shared library is missing for any program, that program won't come up.
Ldconfig
creates the necessary links and cache to the most recent shared libraries found in the directories specified on the command line, in the file /etc/ld.so.conf, and in the trusted directories (/usr/lib and /lib).
LD_LIBRARY_PATH
an environment variable. This is used to search for the shared objects / dynamic libraries by the operating system for extendable functionality at runtime.
/etc/apt/sources.list
Apt (advanced packaging tool) uses a file that lists the 'sources' from which packages can be obtained.
dpkg
queries, installs, removes, and maintains Debian software packages and their dependencies.
dpkg-reconfigure
reconfigures an already installed package
apt-get
package management command line program. Installs and removes software packages
apt-cache
used for searching software packages, collecting information of packages and searches for available packages ready for install
aptitude
text based debian package manager
rpm
Red Hat Package Manager. Allows sys admins and users to install, update, uninstall, query and verify packages.
yum
an interactive, automated update program which can be used for maintaining systems using rpm (Red Hat).
yumdownloader
a program for downloading RPMs from Yum repositories.
Bash
bourne again shell
echo
command in the bash and C shells that writes its arguments to standard output
env
used to print a list of the current environment variables, or to run another program in a custom environment without modifying the current one.
pwd
print working directory
set
used to set variables in your environment
unset
used to unset variables in your environment
man
manual pages
uname
Print information about the current system.
history
allows you to use words from previous command lines in the command line you are typing.
cat
used to concatenate two files together. Prints the contents of a file to standard output.
cut
Remove or "cut out" sections of each line of a file or files.
expand
copies files to the standard output, with tab characters expanded to space characters.
fmt
a formatter for simplifying and optimizing text files.
head
prints first 10 lines of a file or any number you specify. Can also specify bytes.
join
Joins the lines of two files which share a common field of data.
less
used to display information to the terminal one page at a time.
nl
number lines of files
od
octal dump
paste
displays the corresponding lines of multiple files side-by-side separated by tabs, to the standard output.
pr
separated by tabs, to the standard output.
sed
stream editor, allows you to filter and transform text.
sort
allows you to filter and transform text. Sort rearrange the lines in a text file so that they are sorted, numerically and alphabetically.
split
Split a file into pieces. split outputs fixed-size pieces of input INPUT to files named PREFIXaa, PREFIXab, ...
tail
prints the last 10 lines of a file or any number you specify. Can also specify bytes.
tr
tr utility copies the standard input to the standard output with substitution or deletion of selected characters.
unexpand
Convert spaces in each FILE to tabs, writing to standard output.
uniq
reports or filters out repeated lines in a file.
wc
word count, counts the words or lines in a file
cp
used to copy files and folders to another location
mkdir
make directory
mv
used to move or rename a file from one location to another
ls
used to list the contents of a directory. ls -al is a long listing that shows permissions.
rm
used to remove file and directories. Use the -R option to recursively remove all files located in a directory.
rmdir
used to remove directories. Use the -R option to recursively remove all files located in a directory.
touch
used to create a file and to update the timestamp if a file.
tar
The tar program is used to create, maintain, modify, and extract files that are archived in the tar format. Tar stands for tape archive
cpio
copies files to and from archives.
dd
copies a file, converting the format of the data in the process, according to the operands specified.
file
used to determine a file's type.
gzip
used to compress or expand files. Each file is replaced by one with the extension .gz, while keeping the same ownership modes, access and modification times.
gunzip
used to compress or expand files. Can currently decompress files created by gzip, zip, compress.
bzip2
a block-sorting file compressor
file globbing
an operation that recognizes the wildcard pattern and expands it into its path name. Ex.) ls office*
tee
Reads from standard input, and writes to standard output and to files. tee duplicates its input, routing it to multiple outputs at once.
xargs
Build and execute command lines from standard input. Takes more then one command and executes them.
&
makes the command run in the background.
bg
used to run a process in the background
fg
used to run a process in the foreground
jobs
Lists the status of all running jobs.
kill
used to send a signal to a process. Use -l or -L to list available signals. Particularly useful signals include HUP, INT, KILL, STOP, CONT, and 0. Alternate signals may be specified in three ways: -9, -SIGKILL or -KILL.
nohup
command with nohup prevents the command from being aborted if you log out or exit the shell. The name nohup stands for "no hangup."
ps
used to show currently running processes
top
a utility used to show running processes. You can kill and reprioritize processes here.
free
shows free diskspace available on the system
uptime
tells you how long the system has been running.
pgrep
looks through the currently running processes and lists the process IDs which matches the selection criteria to stdout.
pkill
send the specified signal (by default SIGTERM) to each process instead of listing them on standard output.
killall
kills processes by name. killall sends a signal to all processes running any of the specified commands.
screen
a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells).
nice
Runs a command with a modified scheduling priority. A process with a lower niceness value is given higher priority and more CPU time. A process with a higher niceness value (a "nicer" process) is given a lower priority and less CPU time, freeing up resources for processes which are more demanding. Niceness values range from -20 (most favorable to the process) to 19 (least favorable to the process).
renice
alters the scheduling priority of one or more running processes. A higher value of priority actually makes the process lower priority
grep
processes text line by line and prints any lines which match a specified pattern. It searches for the PATTERN of text that you specify on the command line, and outputs the results for you.
egrep
Search for a pattern using extended regular expressions. egrep is essentially the same as running grep with the -E option.
fgrep
searches for fixed-character strings in a file or files. "Fixed-character" means the string is interpreted literally — metacharacters do not exist, and therefore regular expressions cannot be used. By specifying that your search string contains fixed characters, you don't need to escape each of them with a backslash. Ex.) "$","^",regex(7)
vi
a visual text editor. 3 modes: Command, Insert, Execute.
fdisk
a menu-driven program for creation and manipulation of partition tables
gdisk
a text-mode menu-driven program for creation and manipulation of partition tables.
parted
a partition manipulation program.
mkfs
used to build a Linux filesystem on a device, usually a hard disk partition. The device argument is either the device name (e.g. /dev/hda1, /dev/sdb2), or a regular file that will contain the file system. The size argument is the number of blocks to be used for the filesystem.
mkswap
mkswap sets up a Linux swap area on a device or in a file.The device argument will usually be a disk partition (something like /dev/sdb7) but can also be a file.
du
estimates and displays the disk space used by files.
df
reports the amount of available disk space being used by file systems. If no file name is given, the space available on all currently mounted file systems is shown.
fsck
checks and repair a Linux file system. fsck stands for "file system consistency check". On most systems, fsck is run at boot time if certain conditions are detected.
mke2fs
mkfs utility is used to create file system (ext2, ext3, ext4, etc) on your Linux system.
debugfs
ext2/ext3 file system debugger.
dumpe2fs
dump ext2/ext3 filesystem information. prints the super block and blocks group information for the filesystem present on device.
tune2fs
used by the system administrator to change/modify tunable parameters on ext2, ext3 and ext4 type filesystems. To display the current values that are set you can use the tune2fs command with the "-l" option or use the dumpe2fs command. XFS tools (such as xfs_metadump and xfs_info)
/etc/fstab
Fstab is your operating system’s file system table.
/media
Temporary mount directory for removable devices.
mount
mounts a storage device or filesystem, making it accessible and attaching it to an existing directory structure. Mounting refers to logically attaching a filesystem to a specified location on the currently accessible (and thus already mounted) filesystem(s) on a computer system so that its contents can be accessed by users
umount
used to manually unmount filesystems on Linux and other Unix-like operating systems. Unmounting refers to logically detaching a filesystem from the currently accessible filesystem(s).
quota
displays users' disk usage and limits. quota reports the quotas of all the filesystems listed in /etc/mtab.
edquota
edit user quotas. Linux disk quotas can be set per user, group, or filesystem with the edquota command.
repquota
summarize quotas for a filesystem. Prints a summary of the disc usage and quotas for the specified file systems. For each user the current number of files and amount of space (in kilobytes) is printed, along with any quotas created with edquota.
quotaon
turn filesystem quotas on. quotaon announces to the system that disk quotas should be enabled on one or more filesystems.
chmod
used to change the permissions of files or directories. chmod stands for "change mode", and it is used to define the way a file can be accessed.
umask
On Linux and other Unix-like operating systems, new files are created with a default set of permissions. Specifically, a new file's permissions may be restricted in a specific way by applying a permissions "mask" called the umask. The umask command is used to set this mask, or to show you its current value.
chown
The chown command changes the owner and owning group of files.
chgrp
Changes group ownership of a file or files.
ln
creates links between files. ln creates hard links by default, or symbolic links if the -s (--symbolic) option is specified.
find
search for files in a directory hierarchy.
locate
finds files by name. locate reads one or more databases prepared by updatedb and writes file names matching at least one of the PATTERNs to standard output, one per line.
updatedb
update the slocate database. This manual page documents slocate, a security-enhanced version of locate. updatedb is simply a link to slocate.
whereis
Locates the binary, source, and manual page files for a command.
which
Locate the executable file associated with a given command. which returns the pathnames of the files (or links) which would be executed in the current environment, had the filename (or filenames) been given as a command.
type
used for displaying information about command type. It displays if command is an alias,shell function, shell builtin, disk file, or shell reserved word.
/etc/updatedb.conf
a configuration file for updatedb.
Linux boot process
BIOS, BIOS stands for Basic Input/Output System. Performs some system integrity checks. MBR. MBR stands for Master Boot Record.It is located in the 1st sector of the bootable disk. Typically /dev/hda, or /dev/sda. GRUB. GRUB stands for Grand Unified Bootloader. If you have multiple kernel images installed on your system, you can choose which one to be executed. Kernel. Mounts the root file system as specified in the “root=” in grub.conf. Kernel executes the /sbin/init program. Init. Looks at the /etc/inittab file to decide the Linux run level. Runlevel programs When the Linux system is booting up, you might see various services getting started. For example, it might say “starting sendmail …. OK”. Those are the runlevel programs, executed from the run level directory as defined by your run level.
Runlevels
0 – halt 1 – Single user mode 2 – Multiuser, without NFS 3 – Full multiuser mode 4 – unused 5 – X11 6 – reboot