1Linux Commands – Red Hat Specific Windows Linux General Commands dir dir /ad attrib –h sorting ls ls filename or file* ls directory or dir*
10 Remove Three-Finger Salute Three-Finger Salute Edit /etc/inittab. Find the line: ca::ctrlaltdel:/sbin/shutdown -t3 -r now Remark it out by plac
11 Mounting and Zipping Mount Floppy FAT floppy’s = mount –t vfat /dev/fd0 /mnt/floppy Linux floppy’s = mount /dev/fd0 /mnt/floppy or mount through
12 Mount Windows share using “smbmount” First, you need to create a mount point (directory). I usually do this in the /mount directory Example: mkdi
13You can verify what ports RPC (e.g. NFS) is listening on now that you reconfigured it by issuing the command: rpcinfo -p The following information
14 format a: (floppy) as Linux --> as DOS --> Linux fdformat /dev/fd0 then mkfs –t ext2 /dev/fd0 DOS fdformat /dev/fd0 then mkfs
15 Common Linux Device Names A: floppy /dev/fd0 or /dev/floppy B: floppy /dev/fd1 Master drive on primary IDE channel /dev/hda First partition on m
16 IP Configuration ipconfig ifconfig IP configuration utilities ifconfig netconfig (preferred) linuxconf (catch all) netconf (not preferred, use CT
17 Manually setup static IP and routing by hand TEMPORARY SETUP This will NOT last through a reboot Example: NIC Information: IP address = 192.16
18 Static the Gateway Either use the /etc/sysconfig/network-scripts/eth0 (preferred method) or use the /etc/rc.d/rc.local file DCHP dhcpcd eth0 Ta
19 Recover a Lost Root Password Recover root password For LILO: 1. Boot linux 2. At the LILO prompt ( i.e. Boot: ) type linux single 3. At the comm
2copy con cp /dev/tty filename then CTRL+D to quit edit vi or joe type cat move mv ren mv cls clear help man command fdisk fdisk or cfdisk diskcopy
20 User Administration Add a user useradd Modify a user usermod Delete a user userdel Change password passwd username (if logged on as root, can
21• groupdel (8) - Delete a group • groupmod (8) - Modify a group • groups (1) - print the groups a user is in • grpck (8) - verify integrity of
22The third column is the owner of the file, in this case root. The fourth column is the group of the file, in this case the root group. The fifth
23 XWindows Configure XWindows from command line Xconfigurator Cycle through video settings [CTRL] + [ALT] + [+] Leave XWindows NOW – handy when you
24 MYSQL Open mysql command line from same server mysql –uuser –ppassword i.e. mysql –uroot –pwopnam Open mysql command line from remote serve
25DROP TABLE table_name; DROP DATABASE db_name; SHOW COLUMNS FROM table_name; select * from users; select * from systems; select * from changes;
26 File Editing and Scripts Vi - File Editor vi filename Press Insert key to type in inert mode Press Escape key to leave insert and enter edit mod
27 Secure Default Firewall Ruleset * Explanation * As a brief explanation, the firewall rules for iptables are not really kept in any editable fi
28 –i – Interface tells the kernel which interface should be filtered. –p – Protocol defines the protocol that the rule will apply to. Protocols a
29MySQL iptables -A INPUT -p tcp -m tcp --dport 3306 –j ACCEPT The very last rule we will put in is to drop all remaining packets that didn’t match
3 Login as another user su username Login as another user AND get their path – awesome! su – username See bootup messages after booting dmesg Display
30 GPG √ Description Key Creation Under GPG, there is no GUI. To create a key under, perform the following steps at a command prompt: 1. gpg --
31highlighed above. Using this example you can therefore use the key ID to delete a key, like this: gpg --delete-secret-key 2608ae83 gpg --delete-k
32Setup NTP for Synching Time For more information, all of the following have good information: • http://www.linuxhomenetworking.com/wiki/index.php
33Now allow whatever hosts/networks you are going to allow to query your server for time – for example: # Allowed clients restrict 10.0.0.0 mask 255.
34 remote refid st t when poll reach delay offset jitter ====================================================================
35Help File Library: Bash Scripting Cheat Sheet Written By: ph34r A quick cheat sheet for programmers who want to do shell scripting. This is not i
36Quote Marks Regular double quotes ("like these") make the shell ignore whitespace and count it all as one argument being passed or string
37-r filename Returns True if file, filename can be read by the process. -s filename Returns True if file, filename has a nonzero length. -w fi
38Case select case string1 in str1) commands;; str2) commands;; *) commands;
39Debugging The shell has a number of flags that make debugging easier: sh -n command Read the shell script but don't execute the commands. IE.
4 Directory Size How to find - Size of a directory & Free disk space This article explains 2 simple commands that most people want to know when
40 Test your Linux Skills 1. Create a new directory in your home directory 2. Make a file from scratch in this directory 3. Mount the floppy drive
41Linux Shortcuts and Commands: Linux Newbie Administrator Guide by Stan and Peter Klimas This is a practical selection of the commands we use mos
42available options. THIS SHORTCUT IS GREAT! It even works at LILO prompt! <ArrowUp> Scroll and edit the command history. Press <Enter&g
43command cd ~/my_dir will change my working directory to the subdirectory "my_dir" under my home directory. Typing just "cd" a
44can get GUI-based Ktop from "K"menu under "System"-"Task Manager" (or by executing "ktop" in an X-terminal)
45ls List the content of the current directory. Under Linux, the command "dir" is an alias to ls. Many users have "ls" to be an
46(on many American keyboards it shares the key with "\") The pipe makes the output stop after each screenful. For long files, it is someti
47Netscape (4.x) are known to be big and buggy. They occasionally crash by vanishing (no other harm done). Also, when not connected to the network ,
48commands. The essential ftp command are: ls (see the files on the remote system), ASCII, binary (set the file transfer mode to either text or bina
49killall program_name Kill program(s) by name. xkill (in an xwindow terminal) Kill a GUI-based program with mouse. (Point with your mouse cursor
5The first line would be the default last line of the 'du' output indicating the total size of the directory and another line displaying th
50adduser user_name Create a new account (you must be root). E.g., adduser barbara Don't forget to set up the password for the new user in th
51either "hard wired" (fast, non-removable), "module" (maybe slower, but loaded/removable on demand), or "no" (no suppo
52is also re-run every time you boot the computer, so if you reboot you don't have to run it manually.) mknod /dev/fd0 b 2 0 (=make node, as r
53are available on your RedHat CD, display the info about the packages, and install them if you want (installation must be done as root). Accessi
54ifconfig (as root) Display info on the network interfaces currently active (ethernet, ppp, etc). Your first ethernet should show up as eth0, secon
55right button to get local menus, and learn how to use layers. Save your file in the native gimp file format *.xcf (to preserve layers) and only the
56 Services in Fedora Core 5 The following is a brief explanation on usage and recommendations for some of the different services packaged with Fedor
57apmd Is used by some laptops and older hardware. If your computer supports acpi, then apmd should probably be disabled. auditd This saves audit rec
58firstboot This service is specific to Fedora's installation process meant to perform certain tasks that should only be executed once upon boot
59messagebus This is an IPC (Interprocess Communication) service for Linux. Specifically this communicates with dbus, a critical component. It is hig
6actually stored this as a script named 'usage' since I use it often. Example : I have my Linux installed on /dev/hda1 and I have mounte
60SSH allows other users to log into or run applications on your computer from another computer on your network or remotely. This is a potential secu
7 Boot Loader Information Grub Grub is an acronym for Grand Unified Bootloader. An excellent overview of Grub and how to use it is located at http:
8Regarding the entries of the operating systems that can be booted: • The first entry ("title linux") boots SuSE Linux. • The Linux ker
9 Boot Single-User Mode This is kind of like safe-mode in Windows – it skips a lot of startup files and services: 1. Power on the box 2. At the b
Komentarze do niniejszej Instrukcji