Linux Basic Command
Basic Linux command
ShutdownFirst of all the the command to shutdown the computer.
- "halt"
- "poweroff"
- "shutdown -h now"
when administering a multi-user system and want to shut down the system, you can have an option to notifying all the user like below:
“shutdown –h 10:00 “Shutting down for schedule maintenance.””
The 1st argument is halt is option to close the system, the 2nd argument is the time to close the system, while the last notifying message to others users.
“Shutdown –r” can use to reboot.
Accessing Directories
Display present working directory you can use "pwd". Beside that , you can change your directory to parent directory using "cd .." and change to previous directory "cd -" or "cd ~" to change to home directory.
Exploring the fileSystem
You can use "tree -d" to view just the directories and to suppress listing filesname.
"tree" is to display a tree view of the files systems.(if not yet install, you can install it according the instruction of see below the installation part)
you can use the command "ls" to list the content of the present working directory. while adding the option -a as "ls -a", can list all the files including hidden files and directories(hidden file and directories is start with .)
Find directories
You can find the directories through the command "find / -type d –name init.d",
Creating Symbolic Links
After you know where is the directories you want , you can use it to make a link directly as follow:
1. First Go to the home directory using "cd ~" (ps: the place you want to place the link)
2. Then type in “ln –s /etc/init.d “ ln is the command to create a link at current directory
Create Files
Create files can be done by using the command “touch exercise.txt“
Moving Files is using the mv command for example “mv exercise.txt ../../temp” the first argument is
the file that you want to move, the second argument is the directory you want to move the file.
Remove Files
Removing files is easy by using the rm which can be done like “rm /tmp/exercise.txt”
Locating Application
You can also using the command to locating your application with either the following command “Which apt-get” the argument is the name of the application you want to locate.
If the “which “ does not find the program, you also can try "whereis",it will looks for packages broader range of system directories.
Install or uninstall a software
If you want to install a software you can using the “sudo apt-get install terminator”
“sudo” is the root access to install your application, “apt-get” is APT package handling utility while the “install” is use to tell the kernel to install the application. The 4th argument is the application name that you want to install.
You can remove the application by replace the “install” with “remove” like “sudo apt-get remove terminator”
Comments
Post a Comment