>Some Linux Commands

10:40 PM

>These are not all the commands for Linux, but are rather ones I've learned so far that are important to know *ok, a few of them have so far proved to be just fun to know ;)*. Note that the apt-get commands are for Debian and Debian based distros only. Also, *some* of these only call up executables commonly found in various distros *such as nano* *i.e., if you don't have nano installed, typing nano will be useless*.



cd - change directory

cd .. - move up directory

mkdir *fn* - make new directory *fn*

rm *fn* - remove file *fn*

rm -r *fn* - remove everything in directory *fn* and then the directory itself, r stands for recursive *there's other methods but this one is pretty much the easiest/fastest I've found... use with caution though because there is no coming back*

mv *fn1* *fn2* - move file *fn1* to directory *fn2*, or rename directory *fn1* to *fn2*, or rename file *fn1* to *fn2*

exit - exit session

|ctrl| c - stop current process

kill *fn* - kill *fn* process *must be process id*

killall *fn* - kill *fn* process and its sub processes

ls - list files in directory

ls -l - -l lists detailed info about current directory

ls -a - -a lists hidden files in a directory

ls *part fn* |tab| - list files that start with *part fn*

date - date & time

who - list logged in users

whoami - list current user

finger *un* - list user *un* info

apt-get update - updates repos

apt-get upgrade - upgrades packages

apt-get install *fn* - installs package *fn*

apt-get remove *fn* - removes package *fn*

apt-get dist-upgrade - upgrades distro

apt-get clean - erases downloaded archive files

apt-get autoclean - erases old downloaded archive files

apt-get check - verifies there's no broken packages

su - log in as root

./configure - configures the package

make - compiles the package

make install - installs the package

make uninstall - uninstalls the package

readme - ALWAYS check the readme file that comes with source code before you even BEGIN to configure it; it will save you a headache in some cases *yah, not a command, but good to know*

startx - start x server

umount *fn* - unmount *fn*

uname -a - list installed linux kernel version

glxgears -info - show opengl fps + info

glxinfo - show opengl info

nano - easy to use text editor

pico - another easy to use text editor

|ctrl|+|alt|+|F6| - allows you to leave your current user session temporarily to sign in as a different user

|ctrl|+|alt|+|F7| - allows you to return to your previous user session

useradd *x* - add user *x*

passwd *x* - make user password *x*

history - lists last 400 commands used in shell

|up arrow key| - shows last command used in shell

shutdown -h now - shutdown, um, NOW *h stands for halt*

shutdown -r now - reboot, um, NOW *guess what the r stands for?*

shutdown -h 20:01 - shutdown at 8:01 PM

shutdown -h +% - shutdown in 5 minutes

You Might Also Like

0 comments