Most answered questions in Linux Administration

0 votes
1 answer

awk: to print all columns from the nth to the last

the following will print all but the ...READ MORE

Jul 19, 2019 in Linux Administration by Shubham
• 13,490 points
7,644 views
0 votes
1 answer

How to have the cp command create only if necessary folders while copying a file to a destination

mkdir -p /foo/bar && cp myfile "$_" ...READ MORE

Jul 19, 2019 in Linux Administration by Shubham
• 13,490 points
1,109 views
0 votes
1 answer

How to Unblock SSH and FTP Access to Specific IP in Linux?

Firewalls(most of them) can either Reject or ...READ MORE

Jul 16, 2019 in Linux Administration by Archana
• 5,640 points
14,701 views
0 votes
1 answer

copy and create destination directory using bash

mkdir -p "$d" && cp file "$d" try ...READ MORE

Jul 16, 2019 in Linux Administration by Upasana
• 8,620 points
653 views
0 votes
1 answer

Command to tar directory excluding certain files/folders

$ tar --exclude='./folder' --exclude='./upload/folder2' -zcvf /backup/filename.tgz . Try ...READ MORE

Jul 13, 2019 in Linux Administration by Shubham
• 13,490 points
1,085 views
0 votes
1 answer

Change the output colour of echo

Try using ANSI escape codes as the following; Black ...READ MORE

Jul 13, 2019 in Linux Administration by Shubham
• 13,490 points
558 views
0 votes
1 answer

Centos 7 network setup

Power off the VM and then go ...READ MORE

Jul 5, 2019 in Linux Administration by Vasini
867 views
0 votes
1 answer

Error: tkinter for Python Installation

It isn't easy to install Tkinter locally ...READ MORE

Jul 4, 2019 in Linux Administration by Upasana
• 8,620 points
744 views
0 votes
1 answer

Running scripts as a different user without password

You'll have to edit you sudoers file ...READ MORE

Jul 3, 2019 in Linux Administration by DareDev
• 6,890 points
1,918 views
0 votes
1 answer

Display shared libraries used by executables in linux

In order to do this, you need ...READ MORE

Jul 3, 2019 in Linux Administration by ajs3033
• 7,300 points
1,077 views
0 votes
1 answer

Using shell variables in an awk script

Using -v is, imo, The best way because ...READ MORE

Jul 1, 2019 in Linux Administration by Shubham
• 13,490 points
2,361 views
0 votes
1 answer

Can I analyze a program's core dump file with GDB when it has command-line parameters?

You can simply use of GDB, to debug ...READ MORE

Jul 1, 2019 in Linux Administration by Shubham
• 13,490 points
7,724 views
0 votes
1 answer

To attach a file using mail command on Linux

$ echo | mutt -a syslogs.tar.gz admin@domain.org READ MORE

Jun 28, 2019 in Linux Administration by Upasana
• 8,620 points
2,601 views
0 votes
1 answer

How to find the group associated with a user in linux?

To list all the groups groups or to list ...READ MORE

Jun 21, 2019 in Linux Administration by DareDev
• 6,890 points
760 views
0 votes
1 answer

Running a cron job at fixed intervals of time

Just use this instead: 0,30 * * * ...READ MORE

Jun 21, 2019 in Linux Administration by ajs3033
• 7,300 points
713 views
0 votes
1 answer

Difference between root (/) and home directory (~) in terminal?

Root directory which is referred to as ...READ MORE

Jun 20, 2019 in Linux Administration by Vicky
25,787 views
0 votes
1 answer

CentOS Error: 64 bit bad ELF interpreter

In my experience, a single yum command will ...READ MORE

Jun 20, 2019 in Linux Administration by Shubham
• 13,490 points
1,944 views
0 votes
1 answer

Script file name in a Bash script

$0 will give you the complete basename. ...READ MORE

Jun 20, 2019 in Linux Administration by Shubham
• 13,490 points
543 views
0 votes
1 answer

Killing a Zombie Process

You can clean up a zombie process ...READ MORE

Jun 20, 2019 in Linux Administration by Upasana
• 8,620 points
741 views
0 votes
1 answer

pipe to clipboard using Bash

Try xclip; xclip - command line interface to ...READ MORE

Jun 17, 2019 in Linux Administration by Shubham
• 13,490 points
670 views
0 votes
1 answer

Overall CPU usage (%)

top -bn2 | grep "Cpu(s)" | \ ...READ MORE

Jun 17, 2019 in Linux Administration by Shubham
• 13,490 points
814 views
0 votes
1 answer

How can I find out which files differ in two directory trees?

Use this; diff -qr dir1/ dir2/ READ MORE

Jun 13, 2019 in Linux Administration by Upasana
• 8,620 points
563 views
0 votes
1 answer

Linux: Efficiently test if a port is Open

$ nc -z <host> <port>; echo $? Use ...READ MORE

Jun 12, 2019 in Linux Administration by Shubham
• 13,490 points
549 views
0 votes
1 answer

127.0.0.1: Could not Determine the server's fully qualified domain name

If you don't have httpd.conf in folder /etc/apache2, you should ...READ MORE

Jun 12, 2019 in Linux Administration by Shubham
• 13,490 points
1,702 views
0 votes
1 answer

How to send mail using linux shell script?

If you've already configured the server, with ...READ MORE

Jun 11, 2019 in Linux Administration by ajs3033
• 7,300 points
1,002 views
0 votes
1 answer

Replacing string characters using CLI

To replace each of xy and z ...READ MORE

Jun 11, 2019 in Linux Administration by DareDev
• 6,890 points
728 views
0 votes
1 answer

Linux: Finding all storage devices attached to a machine

Use /proc/partitions first. This will list all ...READ MORE

Jun 10, 2019 in Linux Administration by Upasana
• 8,620 points
555 views
0 votes
1 answer

Ubuntu 10.10: Connecting to a terminal to a serial-to-USB device on Maverick Meerkat

Check with dmesg | grep tty if system recognize ...READ MORE

Jun 10, 2019 in Linux Administration by Upasana
• 8,620 points
7,749 views
0 votes
1 answer

Argument receiving error for rm command

Bash actually expands the asterisk to every ...READ MORE

Jun 8, 2019 in Linux Administration by Shubham
• 13,490 points
734 views
0 votes
1 answer

Docker: Can't connect to docker daemon

Documentation Link: Post-installation steps for Linux  This documentation reveals ...READ MORE

Jun 8, 2019 in Linux Administration by Shubham
• 13,490 points
1,027 views
0 votes
1 answer

Cannot understand this "No X11 DISPLAY variable" error thrown at me

If you're on the main display, then export ...READ MORE

Jun 5, 2019 in Linux Administration by Upasana
• 8,620 points
10,334 views
0 votes
1 answer

Which is a good hex editor for Linux?

You could try Bless. It is written ...READ MORE

Jun 5, 2019 in Linux Administration by Upasana
• 8,620 points
600 views
0 votes
1 answer

Redirecting output to a file and stdout

The command you want is named tee; foo ...READ MORE

May 31, 2019 in Linux Administration by Shubham
• 13,490 points
798 views
0 votes
1 answer

How to extract file base name without path and extension in bash?

You don't actually have to call the ...READ MORE

May 31, 2019 in Linux Administration by Shubham
• 13,490 points
5,482 views
0 votes
1 answer

Linux: Recursive download of a folder via FTP

wget -r ftp://user:pass@server.com/ try this. READ MORE

May 31, 2019 in Linux Administration by Upasana
• 8,620 points
459 views
0 votes
1 answer

to pass the user's password to scp

Try using the 'expect' script on the ...READ MORE

May 29, 2019 in Linux Administration by Shubham
• 13,490 points
3,756 views
0 votes
1 answer

Linux : Undefined reference to pthread_create

Try this; gcc -pthread -o term term.c Hope this ...READ MORE

May 29, 2019 in Linux Administration by Shubham
• 13,490 points
9,715 views
0 votes
1 answer

Linux: Using grep to display filenames

You need t use -l flag with ...READ MORE

May 24, 2019 in Linux Administration by ajs3033
• 7,300 points
556 views
0 votes
1 answer

How to change the default shell in Linux?

1. Change the password file directly for ...READ MORE

May 24, 2019 in Linux Administration by Upasana
• 8,620 points
794 views
0 votes
1 answer

How to convert DOS line endings to Linux line endings in vim?

try this; :%s/\r/\r/g READ MORE

May 24, 2019 in Linux Administration by Upasana
• 8,620 points
745 views
0 votes
1 answer

“cd” doesn't work in my shell script

One way to get around this is ...READ MORE

May 24, 2019 in Linux Administration by Shubham
• 13,490 points
1,533 views
0 votes
1 answer

#! what is this called?

the # is called a hash, and ...READ MORE

May 24, 2019 in Linux Administration by Shubham
• 13,490 points
722 views
0 votes
1 answer

Installation fails on xenial "Repository does not have a release file"

This bug is missing log files that ...READ MORE

May 23, 2019 in Linux Administration by Ishaan
590 views
0 votes
1 answer

Linux Permissions: Sticky bits

You might have come across read, write ...READ MORE

May 21, 2019 in Linux Administration by John
494 views
0 votes
1 answer

finding the MySQL my.cnf location

You could always run find in a ...READ MORE

May 21, 2019 in Linux Administration by Upasana
• 8,620 points
414 views
0 votes
1 answer

Determining whether a given Linux is 32 bit or 64 bit

try this. getconf LONG_BIT Output: 32, if OS is 32 ...READ MORE

May 21, 2019 in Linux Administration by Upasana
• 8,620 points
411 views
0 votes
1 answer

Writing a heredoc to a file in a script

try to use tee: tee newfile <<EOF line 1 line 2 line ...READ MORE

May 20, 2019 in Linux Administration by Shubham
• 13,490 points
1,309 views
0 votes
1 answer

What is the meaning of 'errno'?

you can retrieve a complete list of ...READ MORE

May 20, 2019 in Linux Administration by Shubham
• 13,490 points
711 views
0 votes
1 answer

How to find path of software installed in Linux?

There are multiple ways to find the ...READ MORE

May 20, 2019 in Linux Administration by Rishi
7,757 views
0 votes
1 answer

Merge multiple pdf files in one using terminal

Install a utility call pdfunite which is ...READ MORE

May 17, 2019 in Linux Administration by ajs3033
• 7,300 points
631 views