Cygwin Install Usermod
Unix Toolbox. Unix Toolbox. This document is a collection of UnixLinuxBSD commands and tasks which are useful for IT work or for advanced users. This is a practical guide with concise explanations, however the reader is supposed to know what she is doing. Hardware Statistics Users Limits Runlevels root password Compile kernel Repair grub Misc. Running kernel and system information. Get the kernel version and BSD version. Full release info of any LSB distribution. Su. SE release Get Su. SE version. cat etcdebianversion Get Debian version. Use etcDISTR release with DISTR lsb Ubuntu, redhat, gentoo, mandrake, sun Solaris, and so on. See also etcissue. Show how long the system has been running load. Display the IP address of the host. Linux only. man hier Description of the file system hierarchy. Show system reboot history. Hardware Informations. Kernel detected hardware. Detected hardware and boot messages. Read BIOSLinux cat proccpuinfo CPU model. Hardware memory. grep Mem. Total procmeminfo Display the physical memory. Watch changeable interrupts continuously. Used and free memory m for MB. Configured devices. Show PCI devices. Cygwin Install Usermod Solaris' title='Cygwin Install Usermod Solaris' />Show USB devices. Show a list of all devices with their properties. Show DMISMBIOS hw info from the BIOSFree. BSD sysctl hw. model CPU model. Gives a lot of hardware information. CPUs installed. sysctl vm Memory usage. Hardware memory. sysctl a grep mem Kernel memory settings and info. Configured devices. Show PCI devices. Show USB devices. Cygwin Install Usermod' title='Cygwin Install Usermod' />UNIX Commands for DBAs This article contains a brief list of commands that most UNIX DBAs will need on a regular basis. File and Directory Navigation find, grep, alias. SJIS2003051920161210. UNIX. xtermkterm. Download the free trial version below to get started. Doubleclick the downloaded file to install the software. Show ATA devices. Show SCSI devices. Load, statistics and messages. The following commands are useful to find out what is going on on the system. IO statistics 2 s intervals. BSD summary of system statistics 1 s intervals. BSD tcp connections try also ip. This tutorial describes how to join an Ubuntu machine into a Samba4 Active Directory domain in order to authenticate AD accounts with local ACL for files and. Hire IT Professionals for your Projects Hire Programmers, Hire IT Professionals, IT Staffing, Software Development Hire Certified and Experienced Professionals on. BSD active network connections. BSD network traffic through active interfaces. BSD CPU and and disk throughput. VpikUBwawEI/AAAAAAAANGw/Ww6-y3fmw1M/w1200-h630-p-k-no-nu/sublime.png' alt='Cygwin Install Usermod Options' title='Cygwin Install Usermod Options' />System V interprocess. Last 5. 00 kernelsyslog messages. System warnings messages see syslog. Users id Show the active user id with login and group. Show last logins on the system. Show who is logged on the system. Add group admin and user colin LinuxSolaris. Colin Barschel g admin m colin. G lt group lt user Add existing user to group Debian. Cygwin Install Usermod aA lt user lt group Add existing user to group Su. SE. userdel colin Delete user colin LinuxSolaris. Free. BSD add user joe interactive. Free. BSD delete user joe interactive. Use pw on Free. BSD. Add a new member to a group. Colin Barschel g admin m s bintcsh. Encrypted passwords are stored in etcshadow for Linux and Solaris and etcmaster. Free. BSD. If the master. To temporarily prevent logins system wide for all users but root use nologin. The message in nologin will be displayed might not work with ssh pre shared keys. Sorry no login now etcnologin Linux. Sorry no login now varrunnologin Free. BSDLimits. Some application require higher limits on open files and sockets like a proxy. The default limits are usually too low. Linux. Per shellscript. Welcome to The CHIP Operating System. We made a computer. A 9 computer. And every computer needs an operating system. Ours is The CHIP Operating System. A collection of UnixLinuxBSD commands and tasks which are useful for IT work or for advanced users. The shell limits are governed by ulimit. The status is checked. For example to change the open files limit from. This is only valid within the shell. The ulimit command can be used in a script to change the limits for the script only. Per userprocess. Login users and applications can be configured in etcsecuritylimits. For example. cat etcsecuritylimits. Limit user processes. Limit application open files. System wide. Kernel limits are set with sysctl. Permanent limits are set in etcsysctl. View all system limits. Adobe Flash Player Sound here. View max open files limit. Change max open files limit. Permanent entry in sysctl. How many file descriptors are in use. Free. BSDPer shellscript. Use the command limits in csh or tcsh or as in Linux, use ulimit in an sh or bash shell. Per userprocess. The default limits on login are set in etclogin. An unlimited value is still limited by the system maximal value. Kernel limits are also set with sysctl. Permanent limits are set in etcsysctl. The syntax is the same as Linux but the keys are different. View all system limits. XXXX maximum number of file descriptors. Permanent entry in etcsysctl. Typical values for Squid. TCP queue. Better for apachesendmail. How many file descriptors are in use. How many open sockets are in use. Default is 1. 02. See The Free. BSD handbook Chapter 1. And also Free. BSD performance tuninghttp serverfault. Solaris. The following values in etcsystem will increase the maximum file descriptors per proc. Hard limit on file descriptors for a single proc. Soft limit on file descriptors for a single proc. Runlevels. Linux. Once booted, the kernel starts init which then starts rc which starts all scripts belonging to a runlevel. The scripts are stored in etcinit. N. d with N the runlevel number. The default runlevel is configured in etcinittab. It is usually 3 or 5. The actual runlevel can be changed with init. For example to go from 3 to 5. Enters runlevel 5. Shutdown and halt. Single User mode also S2 Multi user without network. Multi user with network. Multi user with X6 Reboot. Use chkconfig to configure the programs that will be started at boot in a runlevel. List all init scripts. Report the status of sshd. Configure sshd for levels 3 and 5. Disable sshd for all runlevels. Debian and Debian based distributions like Ubuntu or Knoppix use the command update rc. Default is to start in 2,3,4 and 5 and shutdown in 0,1 and 6. Activate sshd with the default runlevels. With explicit arguments. Disable sshd for all runlevels. Shutdown and halt the system. Free. BSD. The BSD boot approach is different from the Sys. V, there are no runlevels. The final boot state single user, with or without X is configured in etcttys. All OS scripts are located in etcrc. The activation of the service is configured in etcrc. The default behavior is configured in etcdefaultsrc. The scripts responds at least to startstopstatus. Go into single user mode. Go back to multi user mode. Shutdown and halt the system. Reboot. The process init can also be used to reach one of the following states level. For example init 6 for reboot. Halt and turn the power off signal USR21 Go to single user mode signal TERM6 Reboot the machine signal INTc Block further logins signal TSTPq Rescan the ttys5 file signal HUPWindows. Start and stop a service with either the service name or service description shown in the Services Control Panel as follows. WSearch. net start WSearch start search service. Windows Search. net start Windows Search same as above using descr. Reset root password. Linux method 1. At the boot loader lilo or grub, enter the following boot option. The kernel will mount the root partition and init will start the bourne shell. Use the command passwd at the prompt to change the password and then reboot. Forget the single user mode as you need the password for that. If, after booting, the root partition is mounted read only, remount it rw. Free. BSD method 1. On Free. BSD, boot in single user mode, remount rw and use passwd. You can select the single user mode on the boot menu option 4 which is displayed for 1. The single user mode will give you a root shell on the partition. Unixes and Free. BSD and Linux method 2. Other Unixes might not let you go away with the simple init trick. Unix Commands for DBAs. This article contains a brief list of commands that most UNIX DBAs will. File and Directory Navigation. The pwd command displays the current. The ls command lists all files and. If no location is defined it acts on the current directory. The a flag lists hidden. The l flag lists file details. More Examples ls al pg do a full directory listing. ORACLEHOMEreports. Verify that. the spoolcmd. List files with hidden. Very useful when you cannot delete a file for an unknown. Shows the. files in a list just. The option h comes handy to. The parameter r shows the. R The R operator makes the ls. The cd command is used to change. The touch command is used to create a new. The rm command is used to delete files. Formulate The Aims And Objectives Of A Training Program on this page. The R flag tells the command to recurse through. R archive. The mv command is used to move or rename. The. represents the current directory. The cp command is used to copy files and. The mkdir command is used to create new. The rmdir command is used to delete. Show all processes owned by. The find command can be used to find the. The flag represents the staring. Wildcards such as dbms can be used for the. Search everywhere for the specified filefind. DISPLAY print pg Search all files for the text string DISPLAY takes a while to run Display only the lines in etcoratab where the lines do not v. Tip for Oracle Users. Oracle produces many extraneous files trace files, log files, dump. Unless they are cleaned periodically, they can fill. To ensure that doesnt happen, simply search for the files with. A. simple command does the trick find. The which command can be used to find the. The which command searches. PATH setting for occurences of the specified executable. The PS1changes your prompt. PS1DiegoMaster DiegoMaster. You can also place special symbols in the variable to show special. For instance the symbol u shows the username who logged in and. If we use these symbols, the prompt can be customized to show. PS1u w oracleoradba. R2db. 1 Here are some other symbols you can use in PS1 shell variable The. The. date in Weekday Month Date formatHThe. TThe. same as but displaying seconds as well. AThe. The. same as A but with the seconds as well The wc utility displays a count of the. The switches for this. README. txt. 85 README. Join. to file. 2 and output to file. The tail. let you see a specified number of lines from the end of the filetail. The head. let you see the specified number of lines from the top of the. The diff. displays the differences between file. Options diff. t ignore white spaces and tabs i ignore case letters AaAnother option, y, shows the same output, but side by side diff. W 1. 20. The alias. Examples alias. al Alias the command ls al to lsalias osecho ORACLEHOME. Here is a list of some very useful aliases I like to define alias lls d. ORACLEHOMEalias osecho ORACLESIDalias tnscd. ORACLEHOMEnetworkadminalias bdumpcd. ORACLEBASEadminORACLESIDbdumpThe echo. DISPLAY display the. DISPLAY variable to screen. With the du. commands, you can display hard disk information. Use 1. 02. 4. byte blocks instead of the default 5. Displays. disk space free on each filesystem. Very useful. The ftp. Invoke the file transfer protocol file exchange program ftp. Once logged in and at the ftp prompt, you have many options bin. Change transfer mode to ascii modesend myfile. Transfer myfile from your local machineget fred Receive the. Transfer all files in current directory of the host to your local. Check the. directory of your local machinepwd Check. The ln. command let you create a link to a file. You use this during the Oracle. Software installationln. K1. 0dboraln s etcinit. S9. 9dboraln s etcinit. S9. 9dbora. The sed. Its helpful to do a global search. Place the html command lt br at the end of. Good for formatting the ouptut of unix. The awk. command it has its own scripting language For example, to display only the 6th field of the output from who am. Field 6 is the IP address of your own terminal session PC. This can be used to automatically set the DISPLAY environment variable. The cksum. command provides a checksum of a file. Its very useful for comparing. Thesplitcommand can split up a file into. Splits bug. 12. 34. The g commands allows you to compress files. The g command results in a compressed copy of the original. The gunzip command reverses. The compress command results in a. Z extension. The uncompress command. Download Podcasts To Sony Walkman more. The rsync. is a great file copier or command to SYNC directories, Here are some. Only get diffs. Do multiple times for troublesome downloads rsync P. Locally copy with rate limit. Its like nice for IO rsync. Mirror web site using compression and encryption rsync az e. Synchronize current directory with remote one rsync auz e. The ssh. command lets you connect to a remote box. The scp command. Run command on HOST as USER default commandshell ssh. USERHOST command Run GUI command on HOSTNAME as USERssh. Y USERHOSTNAME xeyes. Copy with permissions to USERs home directory on HOST scp p r. USERHOST file dir Forward connections to HOSTNAME 8. HOST 8. 0 ssh g L. HOST Forward connections from HOST 1. HOST File Permissions. The umask value is subtracted from the default permissions 6. Default permission. Owner Group World Permission 7 urwx 7 grwx 7 orwx read write execute. Rx 5 gRx 5 oRx read execute. Character eqivalents can be used in the chmod command chmod orwx Rx log. The. R flag causes the command ro recurse through any subdirectories. R oinstall. dba Finally the chgrp. The following example changes the ownership on every single file in. OS Users Management. OS users useradd G oinstall g dba d usrusersmyuser m s binksh myuser. The G flag specifies the primary group. The g flag specifies the secondary group. The d flag specifies the default directory. The m flag creates the default directory. The s flag specifies the default shell. The r flag removes the. Process Management. OS connections whowho head 5who tail 5who grep i orawho wc l. The head 5 command restricts the output to the first 5 lines. The tail 5 command restricts the output to the last 5 lines of. The grep i ora command restricts the output to lines. The wc l command returns the number of lines from who, and. Some users could be just logged on but actually doing nothing. You. can check how long they have been idle, a command especially useful if. HNAME. IDLE PID COMMENToracle. Jan 8. 1. Jan 8 1. 5 5. 7. Dec 2. 6. 1. 3 4. Oct 2. 3. 2. The new column IDLE shows how long they have been idle in hh mm format. Note the value old in that column It means that the user has been. The PID column shows the process ID of their shell connection. The ps. command lists current process information psps ef grep i ora. Specific processes can be killed by specifying the process id in the kill. Lets see what happens when we want to kill the session of the user SH.