what 2 linux commands are used to extract or archive packages?
what linux command is used to schedule a command to run at a later time?
- -l = display current crontab entries
- -r = remove current crontab
- -e = edit crontab
what command can be used on windows, linux, and unix to change or view the host name of a client?
what command can be used to trace a path from one node to another on a network
- traceroute (UNIX/ Linux)
- tracert (Windows)
What UNIX/Linux command can be used to display ip address, network interfaces, transferred & received data info & configure an interface?
- -interface = name of the interface (eth0)
- - up = activates interface
- - down = disables interface
- - address = assigns an ip address
- -netmask = sets subnet mask
What UNIX / Linux command displays a systems's TCP /IP network routing table?
Name the most comon UNIX /Linux file & directory structure and describe what each directory contains/does.
- /boot = contains kernel & system initialization files
- /bin & /sbin = applications & services
- /var = holds variable data (log files, email, print jobs)
- /home - stores user account info
what UNIX/Linux command is used to kill a process?
Kill [process id]
- - to find process id, use ps to list the running programs
- -use killal to kill a program by name
what command can be used to change user ownership of a file in UNIX/linux?
-r = recursively changes ownership
What Linux command is used to print kernel & driver messages?
what linux command can be used to display free disk space? what command can be used to display used disk space?
what 2 commands are used to disable & enable a network interface, respectively?
what command is used to unmount a filesystem in Linux?
what command can be used to run a command as another user in linux?
-u "user" - run command as specified user (runs as root if not specified). user #uid to specify userid.
-H = set home environment varibable to target user specified.
what linux command is used to modify passwords in linux?
-d = delete
What Linux command allows one user to become another user?
- if username is not specified, default user is root.
What UNIX/Linux command can be used to display a manual for the command "command"
How can you connect a linux/unix machine to a windows share named "download" ?
mount -t cifs //ntserver/download -o username = "user",password="password" /mnt/server
- -o=options passed to mount command
- /mnt/server=mount point to acess share
What linux command can be used to add, delete, & list all the services on a computer?
- - add "name" - add service
- - del "name" - delete service
- - list - list all services & whether they are running or not.
What command in windows, Linux, & UNIX can be used to view, edit, routing table & routes?
What UNIX/Linux command is used to add a new user account to a system? What can be used to add a new group?
What command is used to delete a file? (UNIX/Linux)
What switch allows you to delete files recursively?
-r can be used to remove contents of directories recursively
What command is used to mount a device or file system to a computer in linux?
mount -t "filesystem" "partition/device" "mountpoint"
- -a = mount all filesystems
- -r = mount as read only
- -L = "label" - mount the partition with the specified label
- -U "uuid" - mount partition with specified uuid
What UNIX/Linux command can be used to make a directory & what can be used to remove a directory?
What command is used to edit a text file in UNIX/Linux?
- :w "file"- save changes, specify filename to save to new file
- :q - quit
- Switch to command mode[ESC]
- :## - Go to line number ##
- :wq or :zz - Save changes and quit
- :q! - Quit without saving
What command is used to print a file?
What command (UNIX/Linux) can be used to search for the word "hack" in the file "trojan.doc"
grep "hack" "trojan.doc"
- the file searched can also be a directory
What UNIX command can be used to sort the contents of a file?
What UNIX command displays the current date & time?
What UNIX command can be used to list all files in a directory with details?
- -l = use a long listing format
- -a = Do not hide entries starting with .
What command (UNIX) is used to display a list of all running programs?
- -e = select all processes
- -f = full listing
- -A = select all processes (includes those from other users)
What command is used in Linux to search for & install software packages?
apt-get or aptitude
- -d = download only
- -q = quiet
- -y = automatic yes to prompts
- -b = compile source packages after download
- -update = check for updates for packages
- -upgrade = install newest versions of packages
- -install / remove = install or remove a package
What UNIX command can be used to change group ownership of a file?
Chgrp "group" "file"
-r = recursively changes group ownership of subfiles & directories
What UNIX/Linux command can be used to change access privileges of a file so that the owner can read, write & execute it, so members of a group can read & execute, & non-members can read it?
- first digit = owner
- second digit = group
- third digit = others
1 = execute, 2 = write, 4 = read
to add multiple priviledges, add the privileges together.
What command (UNIX) can be used to search for the file "text.doc" in directory "/home/documents" & displays a path to the filename?
Find "/home/documents" -iname "text.doc"
- -name - search for files with the following name
- -iname - search for files with the following name, not case sensitive
What UNIX/Linux command is used to display a list of users currently logged on?
What UNIX/Linux command can be used to move or rename a file?
mv "file1" "file2"
What UNIX/Linux command can be used to copy a file named "tuna.doc" to a new file named "fish.doc"?
cp "tuna.doc" "fish.doc"
What UNIX/Linux command is used to change directory?
what 2 commands can be used to display the current user id & name? (in UNIX/Linux)?
What UNIX command is used to display the contents of a file?
What command (Linux) is used to retrieve files via HTTP/FTP?
What command can be used to perform reverse lookup on an ipaddress in linux?
nslookup "ip address"
What UNIX/Linux command can be used to show network status, address resolution (arp) tables, & routing tables?
- -p = shows ARP tables
- -r = shows routing tables
- -D = show status of DHCP configured devices
What command can be used to list all partitions detected by linux?