• Increase font size
  • Default font size
  • Decrease font size

Linux Commands

How to set linux timezone

1、Logged in as root, check which timezone your machine is currently using by executing `date`. You'll see something like Mon 17 Jan 2005 12:15:08 PM PST, PST in this case is the current timezone.2、Change to the directory /usr/share/zoneinfo here you will find a list of time zone regions. Choose the most appropriate region, if you live in Canada or the US this directory is the "America" directory.3、If you wish, backup the previous timezone configuration by copying it to a different...

 

Setting processor affinity for a certain task or process using taskset command

 taskset is used to set or retrieve the CPU affinity of a running process given its PID or to launch a new COMMAND with a given CPU affinity. However taskset is not installed by default. You need to install schedutils (Linux scheduler utilities) package.Install schedutils

Debian Linux:
# apt-get install schedutils
Red Hat Enterprise Linux:
# up2date schedutils
OR
# rpm -ivh schedutils*
Under latest version of Debian / Ubuntu Linux taskset is installed by default using util-linux...

 

Changing file permissions : chmod

 You can change the permissions of your files (or other people's files if you're the root superuser) by using the command "chmod". The syntax is very simple. For instance if George decides to give write permissions to the administrators, he will type:

chmod g+w myfile

g represents the group of the file (administrators).
w represents the write permission.
+ represents the fact that the permission is added.

If George then lists the permissions using ls -l he obtains:

ls -l...

 

Setting SUID and SGID attributes on executable files

 Setting SUID and SGID attributes on executable files : chmod u+s, chmod g+s

By default, when a user executes a file, the process which results in this execution has the same permissions as those of the user. In fact, the process inherits his default group and user identification.

If you set the SUID attribute on an executable file, the process resulting in its execution doesn't use the user's identification but the user identification of the file owner.

For instance, consider the script...

 

Remove / Uninstall the specified packages [ RPM(s) ]

 Remove package called httpd, enter:

# yum remove {package-name-1} {package-name-2}
# yum remove httpdTask: Display the list of available packages

# yum list allTask: Display list of group software

Type the following command:
# yum grouplist
Output:

Installed Groups: Engineering and Scientific MySQL Database Editors System Tools Text-based Internet Legacy Network Server DNS Name Server Dialup Networking Support FTP Server Network Servers Legacy Software Development...

 
  • «
  •  Start 
  •  Prev 
  •  1 
  •  2 
  •  3 
  •  4 
  •  5 
  •  Next 
  •  End 
  • »
Page 1 of 5