Show current Linux distribution and version information
Answer:
Try the following command in shell.
# head -n1 /etc/issue
Ubuntu 8.10 \n \l
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
Show current Linux distribution and version information
Answer:
Try the following command in shell.
# head -n1 /etc/issue
Ubuntu 8.10 \n \l
How to make shell script run in low priority
Answer:
At the top of your shell script, add the following line (renice 19 -p $$)
#!/bin/sh
renice 19 -p $$
...
How to display the current runlevel in RedHat/Fedora
Answer:
# /sbin/runlevel
N 3
3 is the current runlevel, and N means no previous runlevel
How to find where a command is stored in Linux
Answer:
To find out where a command is stored in Linux, you can use the which command to locate the command
# which wget
/usr/bin/wget
or use whereis command to locate the binary/source/manual
# whereis wget
wget: /usr/bin/wget /usr/share/man/man1/wget.1.gz
How to change the owner of a file in Linux
Answer:
You need to use the chown command:
1. To change the owner of text.txt to john
# chown john /tmp/text.txt
2. To change the owner of text.txt to john, but group identifier to admin.
# chown john:admin /tmp/text.txt
3. To change the group of text.txt to admin
# chown :admin /tmp/text.txt
Reference: http://en.wikipedia.org/wiki/Chown