linux commands

Linux keyboard shortcut

ctrl+Alt+F1
switch to the first text terminals

tty
print the name of the terminal you are typing

ctrl+alt+F7
switch to the first GUI

ctrl+alt+del
shut down the system and reboot

history | more
show the last (1000 or so) commands executed from the command line on the current account.

ps axu | more
list all the processes currently running

top
keep listing the currently running processes on my computer

cat /etc/issue
check what distribution you are using

free
memory info in KB

df -h
print disk info about all the filesystems

cat /proc/cpuinfo
cpu info, shows the information about you processor. the files in the /proc directory are not real files–they are hooks to look at information available to the kernel

cat /proc/version
linux version and other info

cat /proc/filesystems
show the type of filesystems currently in use

runlevel
runlevel is the mode of operation of linux.
0 – halt
1 – single user mode
2 – multiuser
3 – full multiuser mode
4 – unused
5 – X11
6 – reboot

lspci
show info on your motherboard and what cards are inserted into the pci extension slots.

lsdev
display information about your hardware

[root@localhost jacobian]# dmidecode -t 16
# dmidecode 2.9
SMBIOS 2.2 present.

Handle 0x001B, DMI type 16, 15 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 12 GB
Error Information Handle: Not Provided
Number Of Devices: 3

[root@localhost jacobian]# dmidecode -t 17 | grep Size
Size: 512 MB
Size: 256 MB
Size: 256 MB

jacobian@jacobian-HP:~$ lsb_release -d
Description: Ubuntu 8.04.1

to mount iso file
[root@localhost distro]# mount -o loop slax-6.0.1.iso /mnt/iso

for more info you can check this site

http://www.faqs.org/docs/lnag/lnag_commands.html

Advertisements

One comment on “linux commands

  1. James says:

    Sort of… but not quite.

    ctrl+alt+F7 (as you put it) is ptty7, (These are all pseudo terminals, by the way, they’re not seperate and so we call them ptty- use of tty is also more historical now, since teletype writers aren’t generally used 😉 ) – if your OS puts your wm there, then great- mine goes to ptty2.

    I’d certainly recommend less, then more- more is very primitive and is generally kept around for historic reasons.. Unless I’m very much mistaken, it has been more or less at a plateau since 1992. Case in point- forward and backward navigation.

    You’re using far too many commands here to do what uname -a does, too.

    df -h, wouldn’t use it for filesystem information, i’d give fdisk a go for that, all df does is disk space. The h switch (obviously) is for ‘human’ readable output.

    You’ve missed the point of proc- I’d reccomend looking into the Bell Lab research system, Plan 9.

    Look into runlevels, too- I see a lot of suse and ubuntu on your blog; you’ve got it more or less right for suse (you’ve missed the distinctions between 3 and 5) though ubuntu and (some) others don’t use runlevels per se, not without a good hack with telinit scripts and such ;)- You especially want to look into runlevels since you appear to be using ubuntu above.

    I’m not even going to touch your use of dmidecode, if you don’t trust /proc/ or dbus then why not actually *use* your bios, instead of some tool to try and talk to it? Not to mention that horrible use of grep; what is that showing? There is no context to it, look at the -A and -B switches in grep.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s