Linux

Essential shortcuts or commands

Simple shortcut commands

<Ctrl><Alt><F1> Switch to the first text terminal. Under Linux you can have several (6 in standard setup) terminals opened at the same time. <Ctrl><Alt><Fn> (n=1..6) Switch to the nth text terminal. tty Print the name of the terminal in which you are typing this command. <Ctrl><Alt><F7> Switch to the first GUI terminal (if X-windows is running on  ..

Command to extarct or uncompress files

Untar or Decompress files and Folders

How to uncompress or extract the compressed files or zip files? You can use the below commands to uncompress or decompress the files and folders using the below linux command. # tar -zxvf filename.tar.gz (=tape archiver) Untar a tarred and compressed tarball (*.tar.gz or *.tgz) that you downloaded from the Internet.   ..

How to find busy device

Locate the busy driver

When you are trying to unmount a device drive, but it keep saying that your system or drive is busy. # lsof +D /mnt/drive-name This will return the command and process ID of any tasks that is currently accessing the /mnt/drive-name directory. By finding the Process-ID you can either  ..

Free video editors for linux

Free video cutter

Avidemux Avidemux is a free video editor designed for simple cutting, filtering and encoding tasks. It supports many file types, including AVI, DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks can be automated using projects, job queue and powerful scripting capabilities. Avidemux is available for Linux,  ..

How to configure terminal

Change color settings in terminal

To view your current setting of your terminal use the below command # echo $PS1 To Change the current Display # export PS1="\e[0;34m[\u@\h \W]\$ \e[m" Here, \e [Start color scheme x;ym Color pair to use \u user \h host \W  ..

How to find the size of a folder and sub directory

Show the file size

How to find the size of a folder and sub folder in Linux machine In windows machine you can find the size of a file easily just Right click the file or folder -> Select properties -> It will show the file size. In Linux machine you can use du command to  ..

How to find when filesystem was created

Show when you have installed your os

Some time the system admin may want to maintain a record when the filesystem is created and when the operating system is installed. The dumpe2fs will help you to find when the filesystem is created and from tat you can conclude when your operating system was installed? Fdisk command  ..

How to convert a video to youtube flv format

Linux Video converter

Convert your favourite video to youtube fomat or flv format using ffmpeg command. for this you must have installed ffmpeg in your system. The syntax to convert a video to flv format ffmpeg -i Your_video_file -s 320x240 FILE.flv Example to convert a video to flv format # ffmpeg -i mike.avi  ..

How to get inter process communication information ipc

Find information about information about Semaphore and Shared Memory Segments

You can use the ipcs command to get information about Semaphore Arrays, Shared Memory Segments and Message Queues. # ipcs The ipcs command will print the semaphore and Inter process communication information ( IPC ) information. To get IPC information specifically, use # ipcs -u Sample Output: ------ Shared Memory Status -------- segments allocated 100 pages  ..

How to find your system language keyboard setting

Show your locale language

To find the default language configured in your machine use the command locale. The locale command will show the language preference of your system. # locale | grep LANG= Sample OutPut: LANG=en_US.UTF-8   ..

How to find a port is open or not

Determine tcp port is open or close

nmap command can be used to find the tcp port 80 is open or closed. To find whether the port is open or close use the namp command with the following options. nmap -p 80 hostname Example: nmap -p 80 localhost For UDP nmap -sU -p  ..

How to execute exe files in linux

Install wine to use exe

Install Wine to execute exe files in linux machine. yum install wine This will install wine and required files. How to install exe files on linux machine Just execute the setup.exe file to install the package. How to use wine command to execute .exe file in linux machine. - Open Terminal - Type  ..

How to find memory usage of a process

System resource usage of a pid

Use the below command to find the system resource usage of a particular process id. pmap -d <<pid>> Example: pmap -d 5109 OUTPUT: 00c25000 4 rwx-- 0000000000016000 008:00009 libpthread-2.9.so 00c26000 8 rwx-- 0000000000c26000 000:00000 [ anon ] 00c28000   ..

How to kill multiple process of a service

Kill a particular program

To kill all the httpd or apache process you can use the following command. # ps ax| awk '/[h]ttpd/{print $1}'| xargs kill -9 The above command will kill all the http process on the server. To kill all php programs use # fuser -k /usr/bin php Which will kill all the php process.   ..

How to find thread count of a process on aix or linux server

Process thread count

To monitor or view the thread count of a certain process on aix or Unix server use the below command. Syntax to find process thread count ps -o thcount -p <process id> Example to find the process count # ps -o thcount -p 2961 Output: THCNT   ..

< Previous 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Next

Tech Bluff