Home
Flashcards
Preview
Linux
Home
Get App
Take Quiz
Create
How do you open a file in Vi?
Run the Vi
filename
command
How do you search in Vi?
backslash followed by search item
How do you save changes in Vi?
To save your changes use the
w
command
How do you quit from Vi?
To quit use the
:q
command
How do you save and quit a file in Vi?
Use the
:wq
command
How do you abandon any changes you've made in Vi?
Use the
:q!
command
How do you edit a file in Vi?
x
deletes the currently selected character.
dw
deletes the currently selected word.
dd
deletes the currently selected line.
p
places text from a buffer.
u
restores text from a previous change.
How do u insert text into a file in Vi?
i
inserts text at the current position of the editor.
o
opens up a new line below the current position of the cursor.
How do you get out of insert mode and back into command mode in Vi?
Use
esc
key.
What is
vipw
used to edit?
It is used to edit the /etc/passwd file.
What is the vigw file used to edit?
It is used to edit the /etc/group file.
What is the visudo command used for?
It is used to edit the /ect/sudoers file.
What is in the / directory?
This is the root directory the top level directory in FHS all other directory's are subdirectory's of the root.
What is in the
/bin
directory?
Essential command line utilities.
What is in the
/boot
directory?
Includes linux startup files including the linux kernel.
What is in the
/dev
directory?
Hardware and software device drivers.
What is in the
/ect
directory?
Basic configuration files.
What is in the /home directory?
Home directories for all users.
What is in the
/lib
directory?
Program libraries for the kernel and various command line utilities.
What is in the
/media
directory?
The mount point for removal media including floppy drives dvd's ect
What is in the
/misc
directory?
The standard mount point for local directories
What is in the
/mnt
directory?
A legacy mount point.
What is in the
/net
directory?
The standard mount for network directories
What is in the
/opt
directory?
Common location for third party applications.
What is in the /
proc
directory?
Currently running kernel processes as well as kernell configuration settings such as IP forwarding.
What is in the /root directory?
The home directory of the root user.
What is in the /
sbin
directory?
Sytem administration commands.
What is in the /
selinux
directory?
Currently configured settings for security enhanced linux
What is in the /
smb
directory?
The standard mount point for remote shared microsoft directories mounted via the automounter.
What is in the /
srv
directory?
Used by network servers on non red-hat distributions.
What is in the /
tftpboot
directory?
Included if the tftp server is installed
What is in the /
tmp
directory?
Temperary files.
What is in the
/usr
directory?
Small programs accessible to all users.
What is in the /
var
directory?
Variable data including log files and printer spools
What is shown in the /dev directory to represent a floppy drive?
First floppy device /dev/fd0
second floppy device /dev/fd1
What is shown in the /dev directory to represent a PATA (IDE) drive?
First drive = /dev/hda
Second drive = /dev/hdb
What is shown in the /dev directory to represent a SATA or SCSI drive?
First Device = /dev/sda
Second Device = /dev/sdb
What is shown in the /dev directory to represent a Parallel port drive?
First device = /dev/pd1
First tape drive = /dev/pt1
What is shown in the /dev directory to represent a usb drive?
Various widely.
What command do i use to view whats in the /dev directory?
ls -l /dev | more
What command would you use to partition a hard disk?
fdisk
fdisk /dev/sda
What command would you use to format a linux partition?
mkfs
mkfs -t ext3 /dev/hda2
What command would i use to check a filesystem in linux?
fsck
if you want to run the fsck command you have to unmount the filesystem first then run fsck then mount the drive again
eg. unmount /var
fsck -t ext3 /dev/hda7
mount /dev/hda7 /var
What command can you use to find out what directory you are in?
pwd
What command can you use to change directory?
cd
What command can you use to list the files in the current directory?
ls
Author
groper77
ID
13430
Card Set
Linux
Description
linux commands
Updated
2010-04-13T12:08:59Z
Show Answers
Home
Flashcards
Preview