Beruflich Dokumente
Kultur Dokumente
A) #chkconfig -list 2) How to check the default gateway IP in Linux ? A) #route -rn 3) Check the shell that we are currently in? A)#echo $SHELL 4) Check the disks available ? A) #fdisk -l 5) #finger user 6)#uptime 7)#date 8)#cal 9) #w display information about user
show this month s calendar display who is online who you are logged in as show kernel information cpu information memory information
12)#cat /proc/cpuinfo 13) #cat /proc/meminfo 14) #man command 15) #df 16) #du 17) #free
show disk usage show directory space usage show memory and swap usage show possible locations of app show which app will be run by default create a tar named file.tar containing files
extract the files from file.tar create a tar with Gzip compression
22) #tar czf file.tar.gz files 23) #tar xzf file.tar.gz 24) #tar cjf file.tar.bz2 25) #tar xjf file.tar.bz2 26) #gzip file
extract a tar using Gzip create a tar with Bzip2 compression extract a tar using Bzip2
28) #ping kollu 29) #whois domain 30) #dig domain 31)# dig -x host 32) #wget file
ping host(kollu) and output the results get whois information for domain get DNS information for domain reverse lookup host download file continue a stopped download install a package (Debian) install a package (RPM)
display your currently active processes display all running processes kill process id pid kill all processes named proc *
lists stopped or background jobs; resume a stopped job in the background brings the most recent job to foreground brings job n to the foreground
43) #chmod octal file change the permissions of file to octal, which can be foun d separately for user,group, and world by adding: ? 4 read (r) ? 2 write (w) ? 1 execute (x) Refer The Examples: chmod 777 read, write, execute for all chmod 755 rwx for owner, rx for group and world For more options, see man chmod. 44) # ssh kollu@linux5 connect to host(linux5) as user(kollu) 45)# ssh -p port user@host 46)#grep pattern files 47)#grep -r pattern dir 48)#command | grep pattern 49) #locate file 50) #ls connect to host on port
search for pattern in files search recursively for pattern in dir search for pattern in the output of command
directory listing formatted listing with hidden files change directory to dir
change to home
54) #pwd
show current directory create a directory dir delete file delete directory dir force remove file force remove directory dir * copy file1 to file2 copy dir1 to dir2; create dir2 if it doesn t exist
62) # mv file1 file2 rename or move file1 to file2 if file2 is an existing direc tory, moves file1 into directory file2 63)#ln -s file link 64)# touch file 65)#cat > file 66)#more file 67)#head file 68)#tail file create symbolic link link to file
create or update file places standard input into file output the contents of file output the first 10 lines of file output the last 10 lines of file output the contents of file as it grows, starting with the last
Short Cuts: - Ctrl+C halts the current command - Ctrl+Z stops the current command, resume with - fg in the foreground or bg in the background - Ctrl+D log out of current session, similar to exit - Ctrl+W erases one word in the current line - Ctrl+U erases the whole line Ctrl+R type to bring up a recent command - !! repeats the last command - exit log out of current session