...LESSON 2 BASIC COMMANDS IN LINUX AND WINDOWS LESSON 2 – BASIC COMMANDS IN LINUX AND WINDOWS “License for Use” Information The following lessons and workbooks are open and publicly available under the following terms and conditions of ISECOM: All works in the Hacker Highschool project are provided for non-commercial use with elementary school students, junior high school students, and high school students whether in a public institution, private institution, or a part of home-schooling. These materials may not be reproduced for sale in any form. The provision of any class, course, training, or camp with these materials for which a fee is charged is expressly forbidden without a license including college classes, university classes, trade-school classes, summer or computer camps, and similar. To purchase a license, visit the LICENSE section of the Hacker Highschool web page at www.hackerhighschool.org/license. The HHS Project is a learning tool and as with any learning tool, the instruction is the influence of the instructor and not the tool. ISECOM cannot accept responsibility for how any information herein is applied or abused. The HHS Project is an open community effort and if you find value in this project, we do ask you support us through the purchase of a license, a donation, or sponsorship. All works copyright ISECOM, 2004. 2 LESSON 2 – BASIC COMMANDS IN LINUX AND WINDOWS Table of Contents “License for Use” Information....................
Words: 2543 - Pages: 11
...Labs Lab 4.1: Using Linux Command-Line Basics What is the purpose? This lab demonstrates how to redirect data from a process and how to identify and kill a process. What are the steps? • Task 1: Redirecting and piping standard output Procedure 1. Obtain a list of files from the home directory, including the hidden files. Redirect the output to a file named Listing by using the ls -a > listing command. 2. Obtain a long list of files, including the hidden files, and append the output to the same file. 3. Use the cat listing | less command to view the file and pipe the output to less. 4. Use the cat command to view the file again. However, this time, pipe the output to lpr to print the file. 5. Redirect the output of ls to the special file /dev/null. What happens? It’s redirected to dev/null Why? It’s null. • Task 2: Putting tasks in the background and terminating the job Procedure 1. Use the tail –f command to view your listing file from the previous task. The –f option tells tail to follow changes; therefore, the file will continue to run this command until you cancel the command by pressing Ctrl+C. Put the file in the background using the tail -f listing & command. You may need to press Enter again to view the command prompt. 2. Put the process in the background and display the prompt again. Run the top command in the foreground. This will provide you a list of your top 20 processes by CPU usage. Put this list in the background and stop it by pressing...
Words: 780 - Pages: 4
...- crear dos usuarios, uno de ellos enjaulado, para conectar con el servidor ftp (vsftp). vi /etc/vsftpd.conf chroot_local_user=YES chroot_list_enable=YES mkdir /home/ftp/ftpuser chmod -R 777 /home/ftp/ftpuser mkdir /home/ftp/ftpuser2 chmod -R 777 /home/ftp/ftpuser2 sudo useradd -g ftp -d /home/ftp/ftpuser -c "FTP_USER_enjaulado" ftpuser sudo passwd ftpuser (Escribir password) sudo useradd -g ftp -d /home/ftp/ftpuser2 -c "FTP_USER" ftpuser2 sudo passwd ftpuser2 (Escribir password) vi /etc/passwd ftpuser:x:1005:119:FTP_USER:/home/ftp/ftpuser:/bin/ftp vi /etc/vsftpd.chroot_list ftpuser:x:1005:119:FTP_USER:/home/ftp/ftpuser:/bin/ftp /etc/init.d/vsftpd restart _______________________________________________________________________________________________________ - ejecutar 'ftp help', ver comandos 'passive', 'get', 'mget', 'put', 'mput', 'binary' y 'ascii' passive: Si está en modo OFF el servidor de FTP abre la conexión hacia el cliente. Si está en modo ON el cliente es el que abre la conexión hacia el servidor. get: Copia el fichero remoto al servidor en el que estoy mget: Permite copiar varios ficheros desde el servidor remoto en el que estoy. put: Copia el fichero desde el host local hacia el servidor remoto. mput: Permite copiar varios ficheros desde el host en el que estoy hacia el servidor remoto. binary: Establece el modo de transferencia en formato binario. Recomendado para ejecutables. ...
Words: 418 - Pages: 2
.../bin Essential command binaries Holds the files needed to bring the system up and run it when it first comes up in single-user mode. Holds system utilities /boot Static files of the boot loader Contains all of the files needed to boot the system. /dev Device files /etc Machine–local system configuration files One of the most important is /etc/passwd /etc/X11 Machine–local configuration files for the X Window System /home User home directories /lib Shared Libraries /lib/modules Loadable kernel modules /mnt Mount point for temporarily mounting filesystems /opt Add-on software packages. (optional) /proc Kernel and process information virtual filesystem /root home directory for root /sbin Essential system binaries Utilities used for system administration are stored in /sbin and /usr/sbin. /sbin *also /sbin directory includes utilities needed during the booting process /usr/sbin holds utilities used after the system is up and running Older versions of linux In older versions of Linux, many system administration utilities were scattered through several directories that often included other system files (/etc, /usr/bin, /usr/adm, /usr/include). /sys Device pseudofilesystem /tmp temporary files /usr Second major hierarchy. Traditionally includes subdirectories that contain information used by the system....
Words: 640 - Pages: 3
...1. LS- List Directory Content 2. CD- Change Directory 3. MV- Move/Remove Files and Folders 4. RM- Remove files and folders 5. CP- Copy File/Folders 6. LPR- Print Command 7. LPSTAT-Check Print Status 8. HEAD-View beginning content of file 9. TAIL- View ending of file 10. PWD- Print Working Directory 11. STARTX-Start X Server (GUI) 12. POWEROFF-Power off system (turn off/reboot) 13. INIT-Change runs levels 14. ALIAS- Substitute Commands 15. CHMOD-Change file & folder permission 16. CHGRP-Change group permissions (manage multiple/simplify people in network) 17. CHOWN- Change ownership of file or folder 18. CHKCONFIG- Check service configuration(bootup task management) 19. VI/VIM- Virtual Text Editor (command line) 20. CANCEL- Cancel Print Jobs 21. GREP- Search for strings 22. LOCATE- Search your system or files & folders 23. GROUPADD- Add group 24. USERADD-Add Users 25. GZIP-Compression Software 26. LPADMIN- Add/Modify Printer 27. CAT-View File Contents w/o Editing | 28. CHROOT- Security Feature (Chroot Jail) 29. FG-Move processes to foreground (forward) 30. BG-Move processes to background 31. USERDEL-Delete Users 32. GROUPDEL-Delete Groups 33. HISTORY- List last commands (good for tracking) 34. FINGER-Additional information (about user that are logged in. Dangerous Social Engineering) 35. WHOIS-Who is currently logged in(to your system) 36. WHOAMI-Who you are (Currently logged as:root=#, user=$ or ~)...
Words: 341 - Pages: 2
...Project Student College Case Project Linux as an operating system is a powerful tool used in businesses for its secure kernel and command line interface. From a small business to a large enterprise, Linux is used to run servers, store vital information and documents. In Outdoor Adventures, this store needs a more efficient computing system. The system will need to keep information available and secure enough to ensure that the information can only be seen by the right people. To help keep things organized, a file structure will also be required to keep all the files with special permissions together for easy access. To better illustrate the security capabilities of Linux Ed Sawicki of Biznix.org said, “The Linux firewall has functionality that rivals expensive commercial firewalls. Its rules allow fine grained control over stateless and stateful packet filtering. The Linux firewall is extensible, allowing new filtering capabilities as the need arises.” This comparison is powerful when considering what would be the most cost effective direction for a business, but also the safest. Another advantage of linux is that it is generally free to try before applying it to a commercial setting. The product can in effect speak for its self by allowing itself to be made publicly available so there is no need to consider it a “business risk” when a technician can experiment with it first before applying it on a much grander scale. “Linux…is a freely available multitasking and multiuser...
Words: 1333 - Pages: 6
...Exploring Linux Operating Systems What is Linux? Linux is an Operating System for a computer; it is like other Operating Systems such as Windows and the OS X for MAC. Linux was created in 1991 and has been found on many different systems like Super Computers, cell phones, and even the New York stock exchange. What sets Linux apart from other Operating Systems is that Linux is made by several different companies. According to www.linux.com over 3,200 developers have from 200 companies have contributed to the kernel which is just a small piece of the distribution. How is Linux used today? While other Operating Systems are very limited to personal computing devices, Linux is not limited it can be found on many different things. Linux had its start as a server Operating System but is also one of the only Operating System that can be found on more than just a personal computer. Some of the different things it can be found on taken from www.linux.com “These are just the most recent examples of Linux-based devices available to consumers worldwide. This actual number of items that use Linux numbers in the thousands.” www.linux.com File Editors Coming from a Windows Operating System pretty much my whole life, which means I only have experience with GUI editors such as Notepad from Windows. After working with Linux and its file editors this past week I found it much faster and easier than using the notepad system in Windows. There are two different kinds of editors...
Words: 1308 - Pages: 6
...Discipline is the glue that holds a combat team together. Without it there is no unit cohesion, no espirit de corps, no coordination. However, discipline is a complex product of training, leadership, and respect. It is respect which creates devotion to the team, and the important part is that that respect flows both up and down the chain of command. A leader respects the skills, strengths, and sacrifices of the people who work for him, and by giving that respect, in time and with effort, his troops come to respect him as well. That respect grows into devotion: the devotion of the leader to his troops, to do his best to see them through tough times and bring them home to their families, and the devotion of the troops to accomplishing the tasks of their unit under the vision of their leadership. Disrespect, however, has exactly the opposite effect. If a leader disrespects his troops, he fails to earn their respect and therefore fails to create devotion to the team. His attitude will be noticed and will become detrimental to morale, which in turn will hurt the combat effectiveness of each troop as well as the whole. Because he cannot respect his troops, he will also fail to recognize their true strengths and employ his forces to the best of their respective abilities. If, on the other hand, a troop fails to form respect for ANY leader, no matter how good that leader is at their job, then that troop forms a sort of uprising point... a point of discontention that saps unit...
Words: 508 - Pages: 3
...NT1430 Linux Networking: Study Guide Wed 21-November-2012 Linux Commands: Know these commands and what they do: • Directory and list commands o ls, ls –l o pwd o cd / o cd and cd~ (hint: both take you to your home directory) o cd .. (takes you up one directory • Know what cp and mv do and how to use them • File viewing commands: o cat o less and more (one page at atime) o vi and view o tail (shows the last 10 lines of a file) o head (shows the top 10 lines) • chmod for changing permissions on files and directories • know the differences in read write and execute for owner group and all • > to redirect output to a file (overwrites if file exists) • >> appends to a file • & puts a process in the background while fg brings it to the foreground. • ps –ef | grep programname locates a running process for you • grep is a program that searches for a string within a directory or command output • The pipe symbol ( | ) sends output from one command to the input of another. • Know what a Linux shell script is. Direcories and file systems • / is the root of the entire file system • /usr stores program files • /home stores user home directories • /etc stores Linux configuration files • /var stores various miscellaneous files • /proc is a virtual directory that stores system performance metrics...
Words: 1137 - Pages: 5
...edhat® ® Te r r y C o l l i n g s & K u r t W a l l UR ON IT OOLS IN Y T C E CD-R L TH O ED UD M Linux Solutions from the Experts at Red Hat ® ® P R E S S™ SEC Red Hat® Linux® Networking and System Administration Red Hat® Linux® Networking and System Administration Terry Collings and Kurt Wall M&T Books An imprint of Hungry Minds, Inc. Best-Selling Books G Digital Downloads G e-Books G Answer Networks e-Newsletters G Branded Web Sites G e-Learning New York, NY G Cleveland, OH G Indianapolis, IN Red Hat® Linux® Networking and System Administration Published by Hungry Minds, Inc. 909 Third Avenue New York, NY 10022 www.hungryminds.com Copyright © 2002 Hungry Minds, Inc. All rights reserved. No part of this book, including interior design, cover design, and icons, may be reproduced or transmitted in any form, by any means (electronic, photocopying, recording, or otherwise) without the prior written permission of the publisher. Library of Congress Control Number: 2001093591 ISBN: 0-7645-3632-X Printed in the United States of America 10 9 8 7 6 5 4 3 2 1 1O/RT/QT/QS/IN Distributed in the United States by Hungry Minds, Inc. Distributed by CDG Books Canada Inc. for Canada; by Transworld Publishers Limited in the United Kingdom; by IDG Norge Books for Norway; by IDG Sweden Books for Sweden; by IDG Books Australia Publishing Corporation Pty. Ltd. for Australia and New Zealand; by TransQuest Publishers Pte Ltd. for Singapore, Malaysia, Thailand...
Words: 220815 - Pages: 884
...applications. Memory is one of the most essential components of any computer system. No matter which operating system is being used, whether it is Windows, Linux or Mac’s OS X, the same basic requirements of memory management exist. The main requirements of memory management are protection, sharing, relocation and organization. Memory protection is necessary because it stops unauthorized programs, which may contain harmful threats, from accessing the computer’s memory. Memory sharing is when multiple programs need to access the same portion of memory. Proper management of memory ensures that this happens without hindering the performance of the system. Relocation involves moving programs between virtual memory and physical memory 2. Compare two common operating systems—Windows 8 and Fedora 20—on the difference in the memory management features. * Full access vs. No access * Linux Fedora 20: Linux has the most significant access to the source code, allowing the users to alter the code that serves as the foundation of the Linux operating system. * Windows 8: Windows 8 allows no users to the code, which is a good idea once you think about it, as some people has used that access to take advantage to make bugs and viruses. * Licensing freedom vs. licensing restrictions * Linux Fedora 20: With a Linux GPL-licensed operating system, you are free to modify that software and use and even republish or sell it. Also, with the GPL, you can...
Words: 1293 - Pages: 6
...Apply the Ethical Decision Making Method at Small Unit Level 158-C-1230 FM-1 FM 6-22 AR 600-100. Performance Steps: 1. Clearly define the ethical problem. SFC Sharp failed to shred secret documents that he personally marked as shredded. SGT Day is trying to cover for SFC Sharp and is encouraging me to look the other way. 2. Employ applicable laws and regulations. The unit commander and the unit’s standard operating procedure will determine if the documents were mishandled. SFC Sharp recorded the destruction of the book theses pages were from but the commander and proper personnel can determine if misconduct occurred. My responsibility is to report any questionable or unsafe acts. 3. Reflect on the ethical values and their ramifications. FM 1-60 States: “The Army is a values-based organization (Loyalty, Duty, Respect, Selfless Service, Honor, Integrity, Personal courage). It upholds principles that are grounded in the Constitution and inspire guiding values and standards for its members.” FM 1-61 builds on the value based ethics by stating: “The Army Values are the basic building blocks of a Soldier's character...
Words: 565 - Pages: 3
...user-defined variable can be used by processes that run in subshells, that variable must be ___c. exported_. 4. Which of the following files is always executed immediately after a user logs in to a Linux system and receives a BASH shell? a. /etc/profile 5. Which command could you use to see a list of all environment and user-defined shell variables as well as their current values? c. set 6. Every if construct begins with if and must be terminated with __d. fi. 12. How do you indicate a comment line in a shell script? d. Begin the line with #. Chap 8 4. Which runlevel halts the system? a. 1 5. Which file does init reference on startup to determine the default runlevel? d. /etc/inittab 6. Which two commands entered at a command prompt can be used to start X Windows, the window manager, and the default desktop environment? b. gdm c. startx 11. How many active partitions are allowed per hard disk drive? c. 1 15. In what directory is the Linux kernel stored? a. /boot Chap 9 1. Which command entered without arguments is used to display a list of processes running in the current shell? d. ps 4. Which process will always have a PID of 1 and a PPID of 0? c. init 5. A process spawning or initiating another process is referred to as _b. forking ____. 9. The at command is used to __c. schedule processes to run at a single instance in the future_. 11. Every process has a process ID and a ___d. parent process ID_. Chap 10 1. The process of sending print...
Words: 500 - Pages: 2
...Carlos Espiritu 12/10/11 Week 1 homework Page 19 1. What is free software? List three characteristics of free software. Free software includes GNU/Linux, Apache, and some examples of free applications are: KDE, OpenOffice.org. all these application can be used for router/mobile phones..Etc. Linux is free and price plays a roll but not so crucial as other OS. Also source code is available, and software can be used for any purpose, also can be studied and changed. Linux software can be distributed and changed versions as well. 2. What are multiuser sytems? Why are they successful? A multiuser system allows each user at their work terminals to be connected to the computer. The operating system of computer assigns each user a portion of RAM and drives the computer’s time among various users; it is also called time sharing system. In other words, a multiuser system allows many users to simultaneously access the facilities of the host computer. This type of system is capable of having 100’s of users use this computer at once. The commonly used multiuser systems are: 1. LOCAL AREA NETWORK 2. WIDE AREA NETWORK 3. METROPOLITAN AREA NETWORK. 3. In what language is linux written? What does the language have to do with the success of linux? Linux is written in the C programming language and because it is written in the C language the language can be imbedded in all type of devices from TV’s, to PDA’s, cell phones, cable boxes for the reason of this language being so portable...
Words: 796 - Pages: 4
...CIS 206 All iLabs: Devry University (DEVRY) For more course tutorials visit www.tutorialrank.com CIS 206 All iLabs: Devry University ----------------------------------------------------------- CIS 206 Case Study 2-3 Discussing the Functions of an Operating System (DEVRY) For more course tutorials visit www.tutorialrank.com You have been selected to present a short talk on the functions of an operating system for the weekly tech meeting. To support your talk, you must prepare a handout for the attendees. The handout should summarize the information that you have learned about this topic. ----------------------------------------------------------- CIS 206 Case Study 2-4 Discussing How Applications Interact with Operating Systems (DEVRY) For more course tutorials visit www.tutorialrank.com You have been asked to prepare a short lecture for users in the Accounting Department. They have expressed interest in learning more about how the operating system supports the applications they use. Your boss would like to review your lecture notes prior to the class, so you need to save them to a document. Your notes should provide details of your lecture. ----------------------------------------------------------- CIS 206 Case Study 8-2 Researching Background and Font Combinations in Fedora Core 4 (DEVRY) For more course tutorials visit www.tutorialrank.com Case 8-2: Researching Background and Font Combinations in Fedora Core 4 You have been asked to prepare...
Words: 3261 - Pages: 14